Scroll to navigation

Git::Raw::Rebase(3pm) User Contributed Perl Documentation Git::Raw::Rebase(3pm)

NAME

Git::Raw::Rebase - Git rebase class

VERSION

version 0.79

DESCRIPTION

A Git::Raw::Rebase represents a git rebase.

WARNING: The API of this module is unstable and may change without warning (any change will be appropriately documented in the changelog).

METHODS

abort( )

Abort the current rebase, resetting the repository and working directory to their state before rebase began.

commit( $author, $committer )

Commit the current patch. All conflicts that may have been introduced by the last call to "next" must have been resolved. Returns a Git::Raw::Commit object. Both $author and $committer should be Git::Raw::Signature objects.

current_operation( )

Get the current operation. Returns a Git::Raw::Rebase::Operation object or "undef" is there is no operation.

finish( $signature )

Finish the current rebase.

inmemory_index( )

Get the index produced by the last operation which will be committed by the next call to "commit". This is useful for resolving conflicts before committing them. Returns a Git::Raw::Index object.

new( $repo, $branch, $upstream, $onto, [\%rebase_opts])

Initialise a new rebase operation, to rebase the changs in $branch relative to $upstream onto $onto. $branch, $upstream and $onto must be Git::Raw::AnnotatedCommit objects. Valid fields for the %rebase_opts hash include:
  • "quiet"

    Instruct other clients working on this rebase that a quiet rebase experienced is required. This is provided for interoperability with other Git tools.

  • "inmemory"

    Perform an in-memory rebase. This allows for stepping through each operation and committing the rebased changes without rewinding HEAD or putting the repository in a rebase state. This will not interfere with the working directory.

  • "rewrite_notes_ref"

    Name of the notes reference used to rewrite notes for rebased commits when finishing the rebase. If not provided, the contents of the configuration option "notes.rewriteRef" is examined unless the configuration option "notes.rewrite.rebase" is set to a false value. If "notes.rewriteRef" is also not set, no notes will be rewritten.

  • "merge_opts"

    See "Git::Raw::Repository->merge()" for valid %merge_opts values.

  • "checkout_opts"

    See "Git::Raw::Repository->checkout()" for valid %checkout_opts values.

next( )

Perform the next rebase operation. If the operation is one that applies a patch then the patch will be applied and the index and working directory will be updated with the changes. If there are conflicts, these need to be resolved before calling "commit". Returns a Git::Raw::Rebase::Operation object, or "undef" if there aren't any rebase operations left.

open( )

Open an existing rebase.

operation_count( )

Get the number of operations that are to be applied.

operations( )

Get all operations that are to be applied. Returns a list of Git::Raw::Rebase::Operation objects.

AUTHOR

Jacques Germishuys <jacquesg@striata.com>

LICENSE AND COPYRIGHT

Copyright 2018 Jacques Germishuys.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

2018-05-15 perl v5.26.2