Thread (9 messages) flat view 9 messages, 4 authors, 2016-06-15
DORMANTno replies

[PATCH v2 2/2] git-svn: un-break "git svn rebase" when log.abbrevCommit=true

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:53:03
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
Helped-by: Jonathan Nieder [off-list ref]
---
 git-svn.perl |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 712eeeb..bebe38b 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -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;
-- 
1.7.9
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help