Re: git svn log: Use of uninitialized value $sha1_short

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxx>
>   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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux