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

Re: Perl warning in git-svn (git v1.5.3-rc7-16-ge340d7d)

From
RNRobert Newson <robert.newson@gmail.com>
Date
Aug 31, 2007, 15:31 UTC
Message-ID
<46aeb24f0708310831n3c16dbbeke173b6f0cdfa7792@mail.gmail.com>
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;
+               }
Previous: Eric WongNext: Junio C Hamano
Message 4 of 18 in “Perl warning in git-svn (git v1.5.3-rc7-16-ge340d7d)”
  1. Robert NewsonAug 31, 2007
  2. Junio C HamanoAug 31, 2007
  3. Eric WongAug 31, 2007
  4. Robert NewsonAug 31, 2007
  5. Junio C HamanoAug 31, 2007
  6. Robert NewsonAug 31, 2007
  7. Robert NewsonAug 31, 2007
  8. Robert NewsonAug 31, 2007
  9. Junio C HamanoAug 31, 2007
  10. Junio C HamanoAug 31, 2007
  11. Sam VilainAug 31, 2007
  12. Johannes SchindelinAug 31, 2007
  13. git-svn: Protect against "diff.color = true".Junio C Hamano, Aug 31, 2007
  14. Johannes SchindelinAug 31, 2007
  15. Junio C HamanoAug 31, 2007
  16. Johannes SchindelinAug 31, 2007
  17. Junio C HamanoAug 31, 2007
  18. Eric WongAug 31, 2007

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.