git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Robert Newson" <robert.newson@gmail.com>
To: "Eric Wong" <normalperson@yhbt.net>
Cc: "Junio C Hamano" <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: Perl warning in git-svn (git v1.5.3-rc7-16-ge340d7d)
Date: Fri, 31 Aug 2007 16:31:39 +0100	[thread overview]
Message-ID: <46aeb24f0708310831n3c16dbbeke173b6f0cdfa7792@mail.gmail.com> (raw)
In-Reply-To: <20070831152153.GA30745@muzzle>

The difference between the version I'm using (1.5.2.4) and this broken
version shows us what's happened. The $hash value was initialised in
the loop, and now it isn't.

Running 'git-svn log' in my git-svn'ed repo shows this up every time,
it's easy to reproduce.

        my ($head, $refs) = @_;
-       my ($fh, $ctx) = command_output_pipe('rev-list', $head);
-       while (my $hash = <$fh>) {
-               chomp($hash);
-               my ($url, $rev, $uuid) = cmt_metadata($hash);
+       my ($fh, $ctx) = command_output_pipe('log', $head);
+       my $hash = "";
+       my %max;
+       while (<$fh>) {
+               if ( m{^commit ($::sha1)$} ) {
+                       unshift @$refs, $hash if $hash and $refs;
+                       $hash = $1;
+                       next;
+               }

  reply	other threads:[~2007-08-31 15:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-31 12:58 Perl warning in git-svn (git v1.5.3-rc7-16-ge340d7d) Robert Newson
2007-08-31 14:52 ` Junio C Hamano
2007-08-31 15:21   ` Eric Wong
2007-08-31 15:31     ` Robert Newson [this message]
2007-08-31 16:09     ` Junio C Hamano
2007-08-31 16:18       ` Robert Newson
2007-08-31 16:25         ` Robert Newson
2007-08-31 16:25         ` Robert Newson
2007-08-31 20:50     ` Junio C Hamano
2007-08-31 21:22       ` Junio C Hamano
2007-08-31 23:47         ` Sam Vilain
2007-08-31 23:51           ` Johannes Schindelin
2007-08-31 21:29       ` git-svn: Protect against "diff.color = true" Junio C Hamano
2007-08-31 21:38         ` Johannes Schindelin
2007-08-31 21:46           ` Junio C Hamano
2007-08-31 21:53             ` Johannes Schindelin
2007-08-31 22:14               ` Junio C Hamano
2007-08-31 21:58         ` Eric Wong

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46aeb24f0708310831n3c16dbbeke173b6f0cdfa7792@mail.gmail.com \
    --to=robert.newson@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=normalperson@yhbt.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.
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 NNTP newsgroup(s).