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

reducing line crossings in gitk

From
Paul Mackerras <paulus@samba.org>
Date
Jun 11, 2005, 11:47 UTC
Message-ID
<17066.53047.660907.453399@cargo.ozlabs.ibm.com>

At the moment, the commit graph that gitk draws always displays the parents of a merge in left-to-right order as they are listed in the commit (provided that none of the parents already has a line, i.e., is the parent of an previously drawn commit). That means that for the typical merge, the branch coming out to the right is the stuff that was pulled in by the merge.

That can lead to a later line crossing if an ancestor of the stuff being pulled in already has a line that is to the left of the merge. For an example of what I mean, look at the kernel repository with gitk at around commit 5ea6f2c33f0c8b126136dbf1776ffbc444772cd7 (Automatic merge of /spare/repo/netdev-2.6 branch natsemi).

I could add a heuristic to look for this case and reverse the order of the parents, which would reduce the line crossings and make the graph look neater. Would this be worth the slight loss of information (in that the stuff pulled in would no longer always be to the right)?

Paul.
Next: Junio C Hamano
Message 1 of 7 in “reducing line crossings in gitk”
  1. Paul MackerrasJun 11, 2005
  2. Junio C HamanoJun 11, 2005
  3. Paul MackerrasJun 15, 2005
  4. Jon SeymourJun 15, 2005
  5. Paul MackerrasJun 16, 2005
  6. Jon SeymourJun 16, 2005
  7. Matthias UrlichsJun 12, 2005

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.