git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Paul Mackerras <paulus@samba.org>, git@vger.kernel.org
Subject: [PATCH resend again] gitk: Do not pick up file names of "copy from" lines
Date: Fri, 19 Oct 2007 09:25:00 +0200	[thread overview]
Message-ID: <47185BCC.9010307@viscovery.net> (raw)
In-Reply-To: <20071019052823.GI14735@spearce.org>

From: Johannes Sixt <johannes.sixt@telecom.at>

A file copy would be detected only if the original file was modified in the
same commit. This implies that there will be a patch listed under the
original file name, and we would expect that clicking the original file
name in the file list warps the patch window to that file's patch. (If the
original file was not modified, the copy would not be detected in the first
place, the copied file would be listed as "new file", and this whole matter
would not apply.)

However, if the name of the copy is sorted after the original file's patch,
then the logic introduced by commit d1cb298b0b (which picks up the link
information from the "copy from" line) would overwrite the link
information that is already present for the original file name, which was
parsed earlier. Hence, this patch reverts part of said commit.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
---
  Shawn O. Pearce schrieb:
  > I'm carrying these in my pu branch but would like to move them up
  > into master.

  Would you mind putting this one into your queue, too? I haven't seen it
  appear in Paul's repo.

  -- Hannes

  gitk |    3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/gitk b/gitk
index b3ca704..1306382 100755
--- a/gitk
+++ b/gitk
@@ -5216,8 +5216,7 @@ proc getblobdiffline {bdf ids} {
  	    set diffinhdr 0

  	} elseif {$diffinhdr} {
-	    if {![string compare -length 12 "rename from " $line] ||
-		![string compare -length 10 "copy from " $line]} {
+	    if {![string compare -length 12 "rename from " $line]} {
  		set fname [string range $line [expr 6 + [string first " from " $line] ] end]
  		if {[string index $fname 0] eq "\""} {
  		    set fname [lindex $fname 0]
-- 
1.5.3.722.gccbb1

  reply	other threads:[~2007-10-19  7:25 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-19  5:28 gitk patch collection pull request Shawn O. Pearce
2007-10-19  7:25 ` Johannes Sixt [this message]
2007-10-19  7:32   ` [PATCH resend again] gitk: Do not pick up file names of "copy from" lines Shawn O. Pearce
2007-10-19  8:05     ` Johannes Sixt
2007-10-19  8:14       ` Shawn O. Pearce
2007-10-19 11:05 ` gitk patch collection pull request Paul Mackerras
2007-10-20  3:10   ` Shawn O. Pearce
2007-10-20 11:12   ` Jonathan del Strother
2007-10-20 11:46     ` Paul Mackerras
2007-10-20 13:00       ` Jonathan del Strother
2007-10-20 15:32         ` Jan Hudec
2007-10-19 13:44 ` [PATCH-resent] gitk: fix in procedure drawcommits Michele Ballabio
2007-10-20 10:16   ` Paul Mackerras
2007-10-20 16:02     ` Michele Ballabio
2007-10-20 18:35       ` Jan Hudec
2007-10-21  3:01       ` Paul Mackerras
2007-10-21 12:12       ` Rocco Rutte
2007-10-19 19:31 ` gitk patch collection pull request Linus Torvalds
2007-10-20  4:45   ` Paul Mackerras
2007-10-20  4:51     ` Linus Torvalds
2007-10-23  0:20       ` Paul Mackerras
2007-10-23 19:17         ` Linus Torvalds
2007-10-23 23:37           ` Paul Mackerras
2007-10-23 23:51             ` Linus Torvalds
2007-10-24  0:17               ` Paul Mackerras

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=47185BCC.9010307@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=git@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=spearce@spearce.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 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).