Skip to content

Commit

Permalink
Version 0.003000
Browse files Browse the repository at this point in the history
  • Loading branch information
torbiak committed Nov 23, 2020
1 parent 2f625f9 commit d21211e
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 3 deletions.
21 changes: 21 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# 0.003000

The most important change to the interface is that now, if there are any hunks
staged in the index, only those hunks will be considered for assigning to fixup
commits. A temporary git index is used to make any created fixup commits, so
any staged hunks that don't get assigned will remain staged. Thanks to Jonas
Bernoulli and Max Odnoletkov for their help with this.

- Add --gitopt to allow working around git settings issues
- Add --exit-code option, which gives more granular status about what subset of
hunks were assigned to commits

Bug fixes:

- Fix diff commands so that the diff.noprefix, diff.mnemonicPrefix, and
diff.external settings don't result in us getting unexpected input. Thanks to
Paolo Giarrusso and Ryan Campbell for help with this.
- Fix bug where multiple hunks assigned to the same commit would result in
copies of the same fixup commit, resulting in "patch does not apply" errors.
Thanks to Johannes Altmanninger for identifying and fixing this.

# 0.002007

- Fix hunk parsing for files with multiple hunks (broken in 0.002006)
Expand Down
34 changes: 34 additions & 0 deletions README.pod
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,40 @@ Change the number of context lines C<git diff> uses around hunks. Default: 3. Th

Set how strict F<git-autofixup> is about assigning hunks to fixup commits. Default: 0. Strictness levels are described under DESCRIPTION.

=item -g ARG, --gitopt ARG

Specify option for git. Can be used multiple times. Useful for testing, to override config options that break git-autofixup, or to override global diff options to tweak what git-autofixup considers a hunk.

Note ARG won't be wordsplit, so to give multiple arguments, such as for setting a config option like C<-c diff.algorithm>, this option must be used multiple times: C<-g -c -g diff.algorithm=patience>.

=item -e, --exit-code

Use more detailed exit codes:

=over

=item 0

All hunks have been assigned.

=item 1

Only some hunks have been assigned.

=item 2

No hunks have been assigned.

=item 3

There was nothing to be assigned.

=item 255

Unexpected error occurred.

=back

=back

=head1 INSTALLATION
Expand Down
2 changes: 1 addition & 1 deletion git-autofixup
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use Getopt::Long qw(:config bundling);
use File::Temp;
use File::Spec ();

our $VERSION = 0.002007; # X.YYYZZZ
our $VERSION = 0.003000; # X.YYYZZZ

my $VERBOSE;
my @GIT_OPTIONS;
Expand Down
2 changes: 1 addition & 1 deletion lib/App/Git/Autofixup.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package App::Git::Autofixup;
use strict;
use warnings FATAL => 'all';

our $VERSION = 0.002007;
our $VERSION = 0.003000;

=head1 NAME
Expand Down
2 changes: 1 addition & 1 deletion t/autofixup.t
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if ($OSNAME eq 'MSWin32') {
} elsif (!has_git()) {
plan skip_all => 'git version 1.7.4+ required'
} else {
plan tests => 39;
plan tests => 40;
}

require './git-autofixup';
Expand Down

0 comments on commit d21211e

Please sign in to comment.