git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jeff King <peff@peff.net>
Date
Oct 21, 2020, 20:26 UTC
Message-ID
<20201021202642.GA60606@coredump.intra.peff.net>
In-Reply-To
<rmpve5$q2s$1@ciao.gmane.io>
On Wed, Oct 21, 2020 at 09:42:12PM +0300, Nikos Chantziaras wrote:
Show 9 quoted lines
> Running 'git svn log' in a repository that was cloned from an SVN repo
> results in this warning:
> 
> $ git svn log > /dev/null
> 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.
> 
> This doesn't appear to have any ill effects, but the warning might indicate
> a problem somewhere.
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.
  [...]
-Peff
Previous: Nikos ChantziarasNext: Junio C Hamano
Message 2 of 11 in “git svn log: Use of uninitialized value $sha1_short”
  1. Nikos ChantziarasOct 21, 2020
  2. Jeff KingOct 21, 2020
  3. Junio C HamanoOct 21, 2020
  4. Jeff KingOct 21, 2020
  5. brian m. carlsonOct 21, 2020
  6. Jeff KingOct 22, 2020
  7. brian m. carlsonOct 21, 2020
  8. svn: use correct variable name for short OIDbrian m. carlson, Oct 22, 2020
  9. Jeff KingOct 22, 2020
  10. Jeff KingOct 22, 2020
  11. Junio C HamanoOct 22, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.