File Coverage

blib/lib/Git/Raw/Rebase.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 16 16 100.0


line stmt bran cond sub pod time code
1             package Git::Raw::Rebase;
2             $Git::Raw::Rebase::VERSION = '0.86';
3 35     35   236 use strict;
  35         64  
  35         952  
4 35     35   166 use warnings;
  35         79  
  35         791  
5              
6 35     35   168 use Git::Raw;
  35         63  
  35         633  
7 35     35   15333 use Git::Raw::Rebase::Operation;
  35         91  
  35         1560  
8              
9             =head1 NAME
10              
11             Git::Raw::Rebase - Git rebase class
12              
13             =head1 VERSION
14              
15             version 0.86
16              
17             =head1 DESCRIPTION
18              
19             A L represents a git rebase.
20              
21             B: The API of this module is unstable and may change without warning
22             (any change will be appropriately documented in the changelog).
23              
24             =head1 METHODS
25              
26             =head2 abort( )
27              
28             Abort the current rebase, resetting the repository and working directory to
29             their state before rebase began.
30              
31             =head2 commit( $author, $committer )
32              
33             Commit the current patch. All conflicts that may have been introduced by the
34             last call to C must have been resolved. Returns a L
35             object. Both C<$author> and C<$committer> should be L
36             objects.
37              
38             =head2 current_operation( )
39              
40             Get the current operation. Returns a L object or
41             C is there is no operation.
42              
43             =head2 finish( $signature )
44              
45             Finish the current rebase.
46              
47             =head2 inmemory_index( )
48              
49             Get the index produced by the last operation which will be committed by the
50             next call to C. This is useful for resolving conflicts before committing
51             them. Returns a L object.
52              
53             =head2 new( $repo, $branch, $upstream, $onto, [\%rebase_opts])
54              
55             Initialise a new rebase operation, to rebase the changs in C<$branch> relative
56             to C<$upstream> onto C<$onto>. C<$branch>, C<$upstream> and C<$onto> must be
57             L objects. Valid fields for the C<%rebase_opts> hash
58             include:
59              
60             =over 4
61              
62             =item * "quiet"
63              
64             Instruct other clients working on this rebase that a quiet rebase experienced
65             is required. This is provided for interoperability with other Git tools.
66              
67             =item * "inmemory"
68              
69             Perform an in-memory rebase. This allows for stepping through each operation
70             and committing the rebased changes without rewinding HEAD or putting the
71             repository in a rebase state. This will not interfere with the working directory.
72              
73             =item * "rewrite_notes_ref"
74              
75             Name of the notes reference used to rewrite notes for rebased commits when
76             finishing the rebase. If not provided, the contents of the configuration option
77             C is examined unless the configuration option C
78             is set to a false value. If C is also not set, no notes
79             will be rewritten.
80              
81             =item * "merge_opts"
82              
83             See Cmerge()> for valid C<%merge_opts> values.
84              
85             =item * "checkout_opts"
86              
87             See Ccheckout()> for valid C<%checkout_opts> values.
88              
89             =back
90              
91             =head2 next( )
92              
93             Perform the next rebase operation. If the operation is one that applies a patch
94             then the patch will be applied and the index and working directory will be
95             updated with the changes. If there are conflicts, these need to be resolved
96             before calling C. Returns a L object, or
97             C if there aren't any rebase operations left.
98              
99             =head2 open( )
100              
101             Open an existing rebase.
102              
103             =head2 operation_count( )
104              
105             Get the number of operations that are to be applied.
106              
107             =head2 operations( )
108              
109             Get all operations that are to be applied. Returns a list of
110             L objects.
111              
112             =head2 orig_head_name( )
113              
114             Get the original HEAD ref name.
115              
116             =head2 orig_head_id( )
117              
118             Get the original HEAD id.
119              
120             =head2 onto_name( )
121              
122             Get the onto ref name.
123              
124             =head2 onto_id( )
125              
126             Get the onto id.
127              
128             =head1 AUTHOR
129              
130             Jacques Germishuys
131              
132             =head1 LICENSE AND COPYRIGHT
133              
134             Copyright 2018 Jacques Germishuys.
135              
136             This program is free software; you can redistribute it and/or modify it
137             under the terms of either: the GNU General Public License as published
138             by the Free Software Foundation; or the Artistic License.
139              
140             See http://dev.perl.org/licenses/ for more information.
141              
142             =cut
143              
144             1; # End of Git::Raw::Rebase