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

gitk: bug comparing marked commits

From
Pat Thoyts <patthoyts@users.sourceforge.net>
Date
Apr 17, 2009, 22:52 UTC
Message-ID
<87r5zqao6l.fsf@users.sourceforge.net>

I just pulled from gitk and noticed the new 'mark commit' menu items. While testing to see what they do I get a Tk error when comparing two dissimilar patches on the same branch which is caused by a missing parameter to appendwithlinks as fixed by the following patch.

I also get an error comparing two identical patches (one on my working branch and one that has been applied to master). For this when marking the master (476afad) and then calling the 'compare with marked commit' menu item against my original (f58f01e5) I get:

fatal: bad object 0000000000000000000000000000000000000000
fatal: bad object 0000000000000000000000000000000000000000
    while executing
"exec git diff-tree -p --root $id | git patch-id"
    (procedure "getpatchid" line 5)
    invoked from within
"getpatchid $a"
    (procedure "do_cmp_commits" line 16)
    invoked from within
"do_cmp_commits $markedid $rowmenuid"
    (procedure "compare_commits" line 7)
    invoked from within
although the text widget contains text that says:
Commit 478afad6  gitk: Avoid crash if closed while reading references
 is the same patch as
       f58f01e5  gitk: avoid crash if closed while reading references
The fix for problem 1 is:
diff --git a/gitk b/gitk
index dca1741..d9f4828 100755
--- a/gitk
+++ b/gitk
@@ -8175,7 +8175,7 @@ proc do_cmp_commits {a b} {
 		appendwithlinks [mc "Commit %s  %s\n" $shorta $heada] {}
 		appendwithlinks [mc " differs from\n"] {}
 		appendwithlinks [mc "       %s  %s\n" $shortb $headb] {}
-		appendwithlinks [mc "- stopping\n"]
+		appendwithlinks [mc "- stopping\n"] {}
 		break
 	    }
 	}
Message 1 of 1 in “gitk: bug comparing marked commits”
  1. Pat ThoytsApr 17, 2009

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.