All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Cc: Gerrit Pape <pape@smarden.org>
Subject: [PATCH] Revert "gitweb: Add 'status_str' to parse_difftree_raw_line output"
Date: Sat, 5 Apr 2008 21:13:24 +0100	[thread overview]
Message-ID: <200804052213.31253.jnareb@gmail.com> (raw)
In-Reply-To: <200804051938.17855.jnareb@gmail.com>

This reverts commit 6aa6f92fda47cc4ee5f599895e8a5a327fb6f9ab.

It caused is_deleted() subroutine to output warnings when dealing with
old, legacy gitweb blobdiff URLs without either 'hb' or 'hpb'
parameters.

This fixes http://bugs.debian.org/469083

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
> It should be enough to revert commit 6aa6f92 (gitweb: Add 'status_str'
> to parse_difftree_raw_line output); it should fix this bug.

And here it is...

 gitweb/gitweb.perl |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 1be75c6..1501ec8 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2204,7 +2204,7 @@ sub parse_difftree_raw_line {
 		$res{'to_mode'} = $2;
 		$res{'from_id'} = $3;
 		$res{'to_id'} = $4;
-		$res{'status'} = $res{'status_str'} = $5;
+		$res{'status'} = $5;
 		$res{'similarity'} = $6;
 		if ($res{'status'} eq 'R' || $res{'status'} eq 'C') { # renamed or copied
 			($res{'from_file'}, $res{'to_file'}) = map { unquote($_) } split("\t", $7);
@@ -2220,7 +2220,6 @@ sub parse_difftree_raw_line {
 		$res{'to_mode'} = pop @{$res{'from_mode'}};
 		$res{'from_id'} = [ split(' ', $3) ];
 		$res{'to_id'} = pop @{$res{'from_id'}};
-		$res{'status_str'} = $4;
 		$res{'status'} = [ split('', $4) ];
 		$res{'to_file'} = unquote($5);
 	}
@@ -3068,7 +3067,7 @@ sub fill_from_file_info {
 sub is_deleted {
 	my $diffinfo = shift;
 
-	return $diffinfo->{'status_str'} =~ /D/;
+	return $diffinfo->{'to_id'} eq ('0' x 40);
 }
 
 # does patch correspond to [previous] difftree raw line
-- 
1.5.4.4

  reply	other threads:[~2008-04-05 20:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-04 14:23 [PATCH (BUGFIX)] gitweb: Fix "Use of uninitialized value" error in 'history' view Jakub Narebski
2008-04-05  7:51 ` Junio C Hamano
2008-04-05  8:09   ` Jakub Narebski
2008-04-05 16:43 ` Gerrit Pape
2008-04-05 17:16   ` Jakub Narebski
2008-04-05 17:38     ` Jakub Narebski
2008-04-05 20:13       ` Jakub Narebski [this message]
2008-04-06 10:22     ` Gerrit Pape

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=200804052213.31253.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=pape@smarden.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.