Subject: gitk merge display bugs (was: Re: Display of merges in gitk)

From: Sergey Vlasov <[email-masked]>
Date: Sat, 30 Jul 2005 18:32:33 +0400

On Fri, 29 Jul 2005 20:51:40 -0500 Paul Mackerras wrote:

> I have reworked the way gitk displays merges.

I have found a reproducible bug in gitk which seems to be in that new
code for merges.  Run

	gitk f4b3a4c30b5ea3a5de2a2597a3c53266017d02ba

on the git or cogito repository (that commit is from 2005-07-05), then
click the topmost commit ("Merge with Linus' current tree"), then click
it again - you get an error popup with this trace:

can't read "filelines(f13bbe7f56e49a11f6bfc3b73a463c741f969c9c,0,137)": no such element in array
can't read "filelines(f13bbe7f56e49a11f6bfc3b73a463c741f969c9c,0,137)": no such element in array
    while executing
"$ctext insert end "-$filelines($p,$f,$ol)\n" m$pnum"
    (procedure "processgroup" line 143)
    invoked from within
"processgroup"
    (procedure "processhunks" line 47)
    invoked from within
"processhunks"
    (procedure "getmergediffline" line 81)
    invoked from within
"getmergediffline file10 {f4b3a4c30b5ea3a5de2a2597a3c53266017d02ba f13bbe7f56e49a11f6bfc3b73a463c741f969c9c} f4b3a4c30b5ea3a5de2a2597a3c53266017d02ba"

Another badness which appears with the same repository: run

	gitk f13bbe7f56e49a11f6bfc3b73a463c741f969c9c

then repeated clicks on the topmost commit result in a different diff
shown (no error popups, however).

Also if I quickly move between commits, sometimes I get error popups
like:

can't unset "treepending": no such variable
    while executing
"unset treepending"
    (procedure "gettreediffline" line 9)
    invoked from within
"gettreediffline file30 {429a9358763dfb98cd063e40dc49cbc049e2a268 154d3d2dd2656c23ea04e9d1c6dd4e576a7af6de}"

This error does not happen again if the same commit is selected.

All this happens both with current cogito
(134b78a167b5f77725cd8435849de7298b6de477) and git
(9e44f8980b8f41fbeea0a68035865e5778e4dc7d).