Skip to content

Commit

Permalink
git-svn: un-break "git svn rebase" when log.abbrevCommit=true
Browse files Browse the repository at this point in the history
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 <[email protected]>
Helped-by: Jonathan Nieder <[email protected]>
Acked-by: Eric Wong <[email protected]>
  • Loading branch information
avar authored and Eric Wong committed Feb 21, 2012
1 parent b380e3a commit 83cf21f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -1878,8 +1878,7 @@ sub cmt_sha2rev_batch {

sub working_head_info {
my ($head, $refs) = @_;
my @args = qw/log --no-color --no-decorate --first-parent
--pretty=medium/;
my @args = qw/rev-list --first-parent --pretty=medium/;
my ($fh, $ctx) = command_output_pipe(@args, $head);
my $hash;
my %max;
Expand Down

0 comments on commit 83cf21f

Please sign in to comment.