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

Re: gitk drawing bug

From
Paul Mackerras <paulus@samba.org>
Date
Apr 6, 2015, 03:11 UTC
Message-ID
<20150406031134.GA26765@iris.ozlabs.ibm.com>
In-Reply-To
<551F3E20.5010306@gmail.com>
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.
Previous: Martin d'Anjou
Message 4 of 4 in “gitk drawing bug”
  1. Martin d'AnjouFeb 18, 2015
  2. Alex HenrieApr 3, 2015
  3. Martin d'AnjouApr 4, 2015
  4. Paul MackerrasApr 6, 2015

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.