Skip to content

Commit 83cf21f

Browse files
avarEric Wong
authored andcommitted
git-svn: un-break "git svn rebase" when log.abbrevCommit=true
Change git-svn to use git-rev-list(1) instead of git-log(1) since the latter is porcelain that'll cause "git svn rebase" to fail completely if log.abbrevCommit is set to true in the configuration. Without this patch the code will fail to parse a SHA1, and then just spew a bunch of "Use of uninitialized value $hash in string eq" warnings at "if ($c && $c eq $hash) { ..." and never do anything useful. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Helped-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
1 parent b380e3a commit 83cf21f

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

git-svn.perl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1878,8 +1878,7 @@ sub cmt_sha2rev_batch {
18781878

18791879
sub working_head_info {
18801880
my ($head, $refs) = @_;
1881-
my @args = qw/log --no-color --no-decorate --first-parent
1882-
--pretty=medium/;
1881+
my @args = qw/rev-list --first-parent --pretty=medium/;
18831882
my ($fh, $ctx) = command_output_pipe(@args, $head);
18841883
my $hash;
18851884
my %max;

0 commit comments

Comments
 (0)