From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Nikos Chantziaras <realnc@gmail.com>,
"brian m. carlson" <sandals@crustytoothpaste.net>,
git@vger.kernel.org
Subject: Re: git svn log: Use of uninitialized value $sha1_short
Date: Wed, 21 Oct 2020 13:48:50 -0700 [thread overview]
Message-ID: <xmqqwnzj5mq5.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20201021202642.GA60606@coredump.intra.peff.net> (Jeff King's message of "Wed, 21 Oct 2020 16:26:42 -0400")
Jeff King <peff@peff.net> writes:
> It seems to only get mentioned once and never set:
>
> $ git grep sha1_short perl
> perl/Git/SVN/Log.pm: } elsif (/^${esc_color}:\d{6} \d{6} $::sha1_short/o) {
>
> Looks like it got renamed, and this reference was somehow missed?
>
> $ git log -1 -Ssha1_short perl
> commit 9ab33150a0d14089d0496dd8354d4a969e849571
> Author: brian m. carlson <sandals@crustytoothpaste.net>
> Date: Mon Jun 22 18:04:12 2020 +0000
>
> perl: create and switch variables for hash constants
>
> git-svn has several variables for SHA-1 constants, including short hash
> values and full length hash values. Since these are no longer SHA-1
> specific, let's start them with "oid" instead of "sha1". Add a
> constant, oid_length, which is the length of the hash algorithm in use
> in hex. We use the hex version because overwhelmingly that's what's
> used by git-svn.
> [...]
Looks that way. '$::' as opposed to plain '$' threw the replacement
off the track?
perl/Git/SVN/Log.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git i/perl/Git/SVN/Log.pm w/perl/Git/SVN/Log.pm
index 3858fcf27d..9c819188ea 100644
--- i/perl/Git/SVN/Log.pm
+++ w/perl/Git/SVN/Log.pm
@@ -298,7 +298,7 @@ sub cmd_show_log {
get_author_info($c, $1, $2, $3);
} elsif (/^${esc_color}(?:tree|parent|committer) /o) {
# ignore
- } elsif (/^${esc_color}:\d{6} \d{6} $::sha1_short/o) {
+ } elsif (/^${esc_color}:\d{6} \d{6} $::oid_short/o) {
push @{$c->{raw}}, $_;
} elsif (/^${esc_color}[ACRMDT]\t/) {
# we could add $SVN->{svn_path} here, but that requires
next prev parent reply other threads:[~2020-10-21 20:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-21 18:42 git svn log: Use of uninitialized value $sha1_short Nikos Chantziaras
2020-10-21 20:26 ` Jeff King
2020-10-21 20:48 ` Junio C Hamano [this message]
2020-10-21 21:29 ` Jeff King
2020-10-21 22:29 ` brian m. carlson
2020-10-22 2:56 ` Jeff King
2020-10-21 22:21 ` brian m. carlson
2020-10-22 1:18 ` [PATCH] svn: use correct variable name for short OID brian m. carlson
2020-10-22 3:00 ` Jeff King
2020-10-22 3:24 ` Jeff King
2020-10-22 19:29 ` Junio C Hamano
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqwnzj5mq5.fsf@gitster.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=realnc@gmail.com \
--cc=sandals@crustytoothpaste.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).