summaryrefslogtreecommitdiff
path: root/perl
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2020-10-22 01:18:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-10-22 06:03:31 (GMT)
commit03bb366de485e20585b65c48dddb417e0c200f7c (patch)
tree0908f3c9c727f6acc7cfdf9626b59c65762c0cd6 /perl
parent47ae905ffb98cc4d4fd90083da6bc8dab55d9ecc (diff)
downloadgit-03bb366de485e20585b65c48dddb417e0c200f7c.zip
git-03bb366de485e20585b65c48dddb417e0c200f7c.tar.gz
git-03bb366de485e20585b65c48dddb417e0c200f7c.tar.bz2
svn: use correct variable name for short OID
The commit 9ab33150a0 ("perl: create and switch variables for hash constants", 2020-06-22) converted each instance of the variable $sha1_short into $oid_short in the Subversion code, since git-svn now understands SHA-256. However, one conversion was missed. As a result, Perl complains about the use of this variable: Use of uninitialized value $sha1_short in regexp compilation at /usr/lib64/perl5/vendor_perl/5.30.3/Git/SVN/Log.pm line 301, <$fh> line 6. Because we're parsing raw diff output here, the likelihood is very low that we'll actually misparse the data, since the only lines we're going to get starting with colons are the ones we're expecting. Even if we had a newline in a path, we'd end up with a quoted path. Our regex is just less strict than we'd like it to be. However, it's obviously undesirable that our code is emitting Perl warnings, so let's convert it to use the proper variable name. Reported-by: Nikos Chantziaras <realnc@gmail.com> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'perl')
-rw-r--r--perl/Git/SVN/Log.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl/Git/SVN/Log.pm b/perl/Git/SVN/Log.pm
index 3858fcf..9c81918 100644
--- a/perl/Git/SVN/Log.pm
+++ b/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