threads / bug / 38593

gitk drawing bug

Subject: gitk drawing bug

## tl;dr

4 messages between Feb 18, 2015 and Apr 6, 2015.

replies: 3people: 3as markdown or json

Martin d'Anjou· Feb 18, 2015, 19:27 UTC · lore
Hi,

It appears I have uncovered inconsistent behaviour in gitk. Looks like a bug. I have a picture here: https://docs.google.com/document/d/19TTzGD94B9EEIrVU5mRMjfJFvF5Ar3MlPblRJfP5OdQ/edit?usp=sharing

Essentially, when I hit shift-F5, it sometimes draw the history differently (still valid, but drawn differently). There is no change in the repository between the shift-F5 keystrokes.

Thanks, Martin

Alex Henrie· Apr 3, 2015, 23:05 UTC · re: Martin d'Anjou · lore

Re: gitk drawing bug

2015-02-18 12:27 GMT-07:00 Martin d'Anjou <martin.danjou14@gmail.com>:
Show 7 quoted lines
> It appears I have uncovered inconsistent behaviour in gitk. Looks like
> a bug. I have a picture here:
> https://docs.google.com/document/d/19TTzGD94B9EEIrVU5mRMjfJFvF5Ar3MlPblRJfP5OdQ/edit?usp=sharing
>
> Essentially, when I hit shift-F5, it sometimes draw the history
> differently (still valid, but drawn differently). There is no change
> in the repository between the shift-F5 keystrokes.

Did you ever contact the gitk maintainer, Paul Mackerras <paulus@samba.org>, about this bug?

-Alex
Martin d'Anjou· Apr 4, 2015, 01:28 UTC · re: Alex Henrie · lore

Re: gitk drawing bug

On 15-04-03 07:05 PM, Alex Henrie wrote:
Show 12 quoted lines
> 2015-02-18 12:27 GMT-07:00 Martin d'Anjou <martin.danjou14@gmail.com>:
>> It appears I have uncovered inconsistent behaviour in gitk. Looks like
>> a bug. I have a picture here:
>> https://docs.google.com/document/d/19TTzGD94B9EEIrVU5mRMjfJFvF5Ar3MlPblRJfP5OdQ/edit?usp=sharing
>>
>> Essentially, when I hit shift-F5, it sometimes draw the history
>> differently (still valid, but drawn differently). There is no change
>> in the repository between the shift-F5 keystrokes.
> Did you ever contact the gitk maintainer, Paul Mackerras
> <paulus@samba.org>, about this bug?
>
> -Alex
I do not remember contacting Paul Mackerras, but thank you for doing so.
Martin
Paul Mackerras· Apr 6, 2015, 03:11 UTC · re: Martin d'Anjou · lore

Re: gitk drawing bug

On Fri, Apr 03, 2015 at 09:28:00PM -0400, Martin d'Anjou wrote:
Show 9 quoted lines
> On 15-04-03 07:05 PM, Alex Henrie wrote:
> >2015-02-18 12:27 GMT-07:00 Martin d'Anjou <martin.danjou14@gmail.com>:
> >>It appears I have uncovered inconsistent behaviour in gitk. Looks like
> >>a bug. I have a picture here:
> >>https://docs.google.com/document/d/19TTzGD94B9EEIrVU5mRMjfJFvF5Ar3MlPblRJfP5OdQ/edit?usp=sharing
> >>
> >>Essentially, when I hit shift-F5, it sometimes draw the history
> >>differently (still valid, but drawn differently). There is no change
> >>in the repository between the shift-F5 keystrokes.

That's not a bug, it's a consequence of the fact that gitk is designed to be fast. It only lays out as much of the graph is visible plus a little more, not the whole graph, and it doesn't use any global analysis. The reason for that is speed. Gitk is usable on a repository with half a million commits, such as the linux kernel, and to achieve that we can't afford to do wait until we have all the commits read in and then do some computation over the whole topology; it all has to be done incrementally. Also, the underlying git log sometimes gives gitk a parent commit before one of its children, and when that happens the topology has to be modified and thus the graph does too, if any topology that has already been drawn gets modified.

As long as the graph correctly shows the relationships between commits, it has achieved its purpose. If you (or anyone) can come up with improvements that make it look nicer, that's great, and I'll consider them as long as they don't slow down gitk on large repositories to any noticeable extent.

Paul.

← back to recent threads