From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Eric Wong" <normalperson@yhbt.net>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH] git-svn: un-break "git svn rebase" when log.abbrevCommit=true
Date: Sun, 29 Jan 2012 02:11:13 +0000 [thread overview]
Message-ID: <1327803073-7000-1-git-send-email-avarab@gmail.com> (raw)
Change git-svn to parse --no-abbrev-commit --no-decorate to git-log
since it's trying to parse the log output, and the parsing will fail
completely if log.abbrevCommit is set to true in the configuration,
also set --no-decorate so we won't fail if we're processing a commit
that has a tag pointing to it.
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.
A real fix would be to make git-svn not use any porcelain utilities,
but just work around it for now.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
git-svn.perl | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index eeb83d3..570fe9c 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1879,7 +1879,8 @@ sub cmt_sha2rev_batch {
sub working_head_info {
my ($head, $refs) = @_;
my @args = qw/log --no-color --no-decorate --first-parent
- --pretty=medium/;
+ --pretty=medium --no-abbrev-commit --no-decorate/;
+
my ($fh, $ctx) = command_output_pipe(@args, $head);
my $hash;
my %max;
--
1.7.8.3
next reply other threads:[~2012-01-29 2:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-29 2:11 Ævar Arnfjörð Bjarmason [this message]
2012-01-29 2:59 ` [PATCH] git-svn: un-break "git svn rebase" when log.abbrevCommit=true Jonathan Nieder
2012-01-29 3:12 ` Ævar Arnfjörð Bjarmason
2012-01-30 20:41 ` Dan Johnson
2012-01-30 21:18 ` Ævar Arnfjörð Bjarmason
2012-02-12 0:23 ` [PATCH v2 1/2] git-svn: remove redundant porcelain option to rev-list Ævar Arnfjörð Bjarmason
2012-02-12 0:23 ` [PATCH v2 2/2] git-svn: un-break "git svn rebase" when log.abbrevCommit=true Ævar Arnfjörð Bjarmason
2012-02-12 0:31 ` Jonathan Nieder
2012-02-12 6:49 ` [PATCH v2 1/2] git-svn: remove redundant porcelain option to rev-list Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1327803073-7000-1-git-send-email-avarab@gmail.com \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=normalperson@yhbt.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.