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

Display of merges in gitk

From
Paul Mackerras <paulus@samba.org>
Date
Jul 30, 2005, 01:51 UTC
Message-ID
<17130.56620.137642.941175@cargo.ozlabs.ibm.com>

I have reworked the way gitk displays merges. Previously it would display all the diffs between the child and each parent. That displayed a lot of unnecessary stuff; for example, for the famous octopus (pentapus?) merge, each diff was shown 4 times. It also shows diffs when the merge is perfectly straightforward, i.e. when any given file has been modified in at most one of the parents, and the child's version is the same as the parent's.

Now gitk will only list a file as having a difference in a merge if one or more of the parents has a version of the file that is different both from the child and from the common ancestor of the parents (if a common ancestor exists). If there is no common ancestor, then a file is listed if it is different in the child from all of the parents.

I now also display the diffs for a file in one unified difference listing. Lines are color-coded according to which parent they come from, and are in bold with a + at the start of the line if they ended up in the merge result (the child), or in normal font with a - at the start of the line if they didn't. In the usual case of two parents, lines from the first parent are in red and lines from the second parent are in blue. Lines in the result that don't correspond to either parent are in bold black.

Linus, could you do a pull from the usual place to pick this up? (rsync://rsync.kernel.org/pub/scm/gitk/gitk.git). I also included a patch from Junio.

Paul.
Next: Junio C Hamano
Message 1 of 25 in “Display of merges in gitk”
  1. Paul MackerrasJul 30, 2005
  2. Junio C HamanoJul 30, 2005
  3. Shipping gitk as part of core git.Junio C Hamano, Jul 30, 2005
  4. Paul MackerrasJul 31, 2005
  5. Junio C HamanoJul 31, 2005
  6. gitk merge display bugs (was: Re: Display of merges in gitk)Sergey Vlasov, Jul 30, 2005
  7. Linus TorvaldsAug 5, 2005
  8. gitk "hyperlinks" (was Re: Display of merges in gitk)Linus Torvalds, Aug 5, 2005
  9. jepler@unpythonic.netAug 5, 2005
  10. Kay SieversAug 6, 2005
  11. Linus TorvaldsAug 6, 2005
  12. Kay SieversAug 7, 2005
  13. gitweb "tag" displayJunio C Hamano, Aug 6, 2005
  14. Junio C HamanoAug 6, 2005
  15. Paul MackerrasAug 19, 2005
  16. Johannes SchindelinAug 19, 2005
  17. Junio C HamanoAug 20, 2005
  18. Kay SieversAug 7, 2005
  19. Paul MackerrasAug 6, 2005
  20. Linus TorvaldsAug 6, 2005
  21. jepler@unpythonic.netAug 6, 2005
  22. gitk SHA link hoversLinus Torvalds, Aug 6, 2005
  23. Paul MackerrasAug 7, 2005
  24. Junio C HamanoAug 6, 2005
  25. Paul MackerrasAug 7, 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.