[PATCH resend again] gitk: Do not pick up file names of "copy from" lines

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Johannes Sixt
Date: Friday, October 19, 2007 - 12:25 am

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

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
gitk patch collection pull request, Shawn O. Pearce, (Thu Oct 18, 10:28 pm)
[PATCH resend again] gitk: Do not pick up file names of "c ..., Johannes Sixt, (Fri Oct 19, 12:25 am)
Re: gitk patch collection pull request, Paul Mackerras, (Fri Oct 19, 4:05 am)
[PATCH-resent] gitk: fix in procedure drawcommits, Michele Ballabio, (Fri Oct 19, 6:44 am)
Re: gitk patch collection pull request, Linus Torvalds, (Fri Oct 19, 12:31 pm)
Re: gitk patch collection pull request, Shawn O. Pearce, (Fri Oct 19, 8:10 pm)
Re: gitk patch collection pull request, Paul Mackerras, (Fri Oct 19, 9:45 pm)
Re: gitk patch collection pull request, Linus Torvalds, (Fri Oct 19, 9:51 pm)
Re: [PATCH-resent] gitk: fix in procedure drawcommits, Paul Mackerras, (Sat Oct 20, 3:16 am)
Re: gitk patch collection pull request, Jonathan del Strother, (Sat Oct 20, 4:12 am)
Re: gitk patch collection pull request, Paul Mackerras, (Sat Oct 20, 4:46 am)
Re: gitk patch collection pull request, Jonathan del Strother, (Sat Oct 20, 6:00 am)
Re: gitk patch collection pull request, Jan Hudec, (Sat Oct 20, 8:32 am)
Re: [PATCH-resent] gitk: fix in procedure drawcommits, Michele Ballabio, (Sat Oct 20, 9:02 am)
Re: [PATCH-resent] gitk: fix in procedure drawcommits, Paul Mackerras, (Sat Oct 20, 8:01 pm)
Re: [PATCH-resent] gitk: fix in procedure drawcommits, Rocco Rutte, (Sun Oct 21, 5:12 am)
Re: gitk patch collection pull request, Paul Mackerras, (Mon Oct 22, 5:20 pm)
Re: gitk patch collection pull request, Linus Torvalds, (Tue Oct 23, 12:17 pm)
Re: gitk patch collection pull request, Paul Mackerras, (Tue Oct 23, 4:37 pm)
Re: gitk patch collection pull request, Linus Torvalds, (Tue Oct 23, 4:51 pm)
Re: gitk patch collection pull request, Paul Mackerras, (Tue Oct 23, 5:17 pm)