git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Nikos Chantziaras <realnc@gmail.com>
Cc: "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 16:26:42 -0400	[thread overview]
Message-ID: <20201021202642.GA60606@coredump.intra.peff.net> (raw)
In-Reply-To: <rmpve5$q2s$1@ciao.gmane.io>

On Wed, Oct 21, 2020 at 09:42:12PM +0300, Nikos Chantziaras wrote:

> 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

  reply	other threads:[~2020-10-21 20:26 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 [this message]
2020-10-21 20:48   ` Junio C Hamano
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=20201021202642.GA60606@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --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).