Skip to content

Commit 70d9119

Browse files
Bramdemerphq
authored andcommitted
updateAUTHORS.pm: overrule 'diff.algorithm'
When the 'diff.algorithm' in git config is set to 'patience' (i.e. `git config diff.algorithm patience`) then t/porting/update_authors.t failed because it can renders a slightly different diff which results in different line counts which caused the test failed. An example of such a commit f7e7b4d: $ git show --oneline --numstat --diff-algorithm=myers f7e7b4d f7e7b4d win32.c: use _mkgmtime() instead of mktime() in stat() 11 2 pod/perldelta.pod 10 13 win32/win32.c $ git show --oneline --numstat --diff-algorithm=patience f7e7b4d f7e7b4d win32.c: use _mkgmtime() instead of mktime() in stat() 11 2 pod/perldelta.pod 9 12 win32/win32.c Note: I opted to use `git -c diff.algorithm` since that will also work on old git versions that don't support `git log --diff-algorithm`
1 parent a128afa commit 70d9119

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Porting/updateAUTHORS.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ sub read_commit_log {
211211
push @args, "'$self->{commit_range}'" if $self->{commit_range};
212212

213213
my $last_commit_info;
214-
my $cmd= qq(git log @args);
214+
my $cmd= qq(git -c diff.algorithm=myers log @args);
215215
$cmd =~ s/'/"/g if $^O =~ /Win/;
216216
open my $fh, "-|", $cmd
217217
or die "Failed to open git log pipe: $!";

0 commit comments

Comments
 (0)