{"thread":{"id":"869","subject":"gitk (was Re: Linux v2.6.12-rc6)","startedAt":"2005-06-08T23:16:42Z","lastAt":"2005-06-10T10:57:45Z","messageCount":2,"participants":["Linus Torvalds","Paul Mackerras"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"4731","messageId":"Pine.LNX.4.58.0506081608450.2286@ppc970.osdl.org","threadId":"869","inReplyTo":"17062.21286.601768.751853@cargo.ozlabs.ibm.com","subject":"gitk (was Re: Linux v2.6.12-rc6)","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-06-08T23:16:42Z","receivedAt":"2005-06-08T23:16:42Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\nBtw, Paul,\n one thing I end up missing in gitk is that looking at merges doesn't show \nany output, yet in many ways merges are actually the most interesting \nones where you'd like to see where a file comes from..\n\nNow, handling multi-way merges may be hard, but at least the normal \ntwo-way merges end up pretty straightforward, I think, and only have four \ncases for each file:\n - not touched by either side (ie it doesn't show up in either of \n   \"git-diff-tree TREE PARENT1\" or \"git-diff-tree TREE PARENT2\")\n - changed by PARENT1 only (ie it shows up in the git-diff-tree between \n   TREE and PARENT2)\n - changed by PARENT2 only\n - changed since both\n\nand it would be cool if the \"filename list\" panel on the right side \ncolorized the names by these things (only three cases - leave the \"not \ntouched\" files off entirely, of course).\n\nAlso, it should actually possible to do a diff for these things with just\ndoing a \"diff3\" on the two parents and on the merge result (diff3 normally\nexpects the \"original\", but hey, the \"original\" might as well be the\nresult), and thus color a merge file by whether the lines came from one\nside or the other or both (or neither, which would be a manual merge\nfixup).\n\nMaybe I'm crazy. But it _seems_ like a good idea that shouldn't be \nfundamentally hard.\n\n\t\tLinus\n"},{"id":"4822","messageId":"17065.29225.943521.738481@cargo.ozlabs.ibm.com","threadId":"869","inReplyTo":"Pine.LNX.4.58.0506081608450.2286@ppc970.osdl.org","subject":"Re: gitk (was Re: Linux v2.6.12-rc6)","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2005-06-10T10:57:45Z","receivedAt":"2005-06-10T10:57:45Z","isPatch":false,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Linus Torvalds writes:\n\n> and it would be cool if the \"filename list\" panel on the right side \n> colorized the names by these things (only three cases - leave the \"not \n> touched\" files off entirely, of course).\n\nHmmm.  How about this: each parent is given a color, and the file\nnames are colored according to which parent they differ in.  If a file\ndiffers in more than one parent it gets listed more than once in the\ncolors for the parents in which it differs, with those entries being\nconsecutive in the list.\n\nIf instead I list the file once in yet another color, I don't see how\nto make it intuitively obvious that that's what the color means, and I\nget a combinatorial explosion in the number of colors required as the\nnumber of parents grows (I would potentially need 2^n - 1 colors for n\nparents).\n\n> Also, it should actually possible to do a diff for these things with just\n> doing a \"diff3\" on the two parents and on the merge result (diff3 normally\n> expects the \"original\", but hey, the \"original\" might as well be the\n> result), and thus color a merge file by whether the lines came from one\n> side or the other or both (or neither, which would be a manual merge\n> fixup).\n\nI already have code in dirdiff to display n-way diffs in a single\nwindow, so it's certainly doable.  I think I will do it a little\ndifferently in this case, though, because the final result has a\nspecial status.  If I color lines according to which parent(s) they\nare present in and then have some other way to show which version was\nchosen (maybe a black box around those lines? or a little tick (check\nmark) or cross icon at the left hand edge of the line?) I think that\nshould be pretty clear.  (I'll need another color for the cases where\nthe result is different to all of the parents, of course.)\n\nSounds interesting.  I'll have a look at it.\n\nPaul.\n"}]}