{"thread":{"id":"18926","subject":"gitk: bug comparing marked commits","startedAt":"2009-04-17T22:52:02Z","lastAt":"2009-04-17T22:52:02Z","messageCount":1,"participants":["Pat Thoyts"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"111550","messageId":"87r5zqao6l.fsf@users.sourceforge.net","threadId":"18926","inReplyTo":null,"subject":"gitk: bug comparing marked commits","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2009-04-17T22:52:02Z","receivedAt":"2009-04-17T22:52:02Z","isPatch":false,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"\nI just pulled from gitk and noticed the new 'mark commit' menu\nitems. While testing to see what they do I get a Tk error when\ncomparing two dissimilar patches on the same branch which is caused by\na missing parameter to appendwithlinks as fixed by the following\npatch.\n\nI also get an error comparing two identical patches (one on my working\nbranch and one that has been applied to master). For this when marking\nthe master (476afad) and then calling the 'compare with marked commit'\nmenu item against my original (f58f01e5) I get:\n\nfatal: bad object 0000000000000000000000000000000000000000\nfatal: bad object 0000000000000000000000000000000000000000\n    while executing\n\"exec git diff-tree -p --root $id | git patch-id\"\n    (procedure \"getpatchid\" line 5)\n    invoked from within\n\"getpatchid $a\"\n    (procedure \"do_cmp_commits\" line 16)\n    invoked from within\n\"do_cmp_commits $markedid $rowmenuid\"\n    (procedure \"compare_commits\" line 7)\n    invoked from within\n\nalthough the text widget contains text that says:\n\nCommit 478afad6  gitk: Avoid crash if closed while reading references\n is the same patch as\n       f58f01e5  gitk: avoid crash if closed while reading references\n\n\nThe fix for problem 1 is:\n\ndiff --git a/gitk b/gitk\nindex dca1741..d9f4828 100755\n--- a/gitk\n+++ b/gitk\n@@ -8175,7 +8175,7 @@ proc do_cmp_commits {a b} {\n \t\tappendwithlinks [mc \"Commit %s  %s\\n\" $shorta $heada] {}\n \t\tappendwithlinks [mc \" differs from\\n\"] {}\n \t\tappendwithlinks [mc \"       %s  %s\\n\" $shortb $headb] {}\n-\t\tappendwithlinks [mc \"- stopping\\n\"]\n+\t\tappendwithlinks [mc \"- stopping\\n\"] {}\n \t\tbreak\n \t    }\n \t}\n"}]}