* gitk (was Re: Linux v2.6.12-rc6) [not found] ` <17062.21286.601768.751853@cargo.ozlabs.ibm.com> @ 2005-06-08 23:16 ` Linus Torvalds 2005-06-10 10:57 ` Paul Mackerras 0 siblings, 1 reply; 2+ messages in thread From: Linus Torvalds @ 2005-06-08 23:16 UTC (permalink / raw) To: Paul Mackerras; +Cc: Git Mailing List Btw, Paul, one thing I end up missing in gitk is that looking at merges doesn't show any output, yet in many ways merges are actually the most interesting ones where you'd like to see where a file comes from.. Now, handling multi-way merges may be hard, but at least the normal two-way merges end up pretty straightforward, I think, and only have four cases for each file: - not touched by either side (ie it doesn't show up in either of "git-diff-tree TREE PARENT1" or "git-diff-tree TREE PARENT2") - changed by PARENT1 only (ie it shows up in the git-diff-tree between TREE and PARENT2) - changed by PARENT2 only - changed since both and it would be cool if the "filename list" panel on the right side colorized the names by these things (only three cases - leave the "not touched" files off entirely, of course). Also, it should actually possible to do a diff for these things with just doing a "diff3" on the two parents and on the merge result (diff3 normally expects the "original", but hey, the "original" might as well be the result), and thus color a merge file by whether the lines came from one side or the other or both (or neither, which would be a manual merge fixup). Maybe I'm crazy. But it _seems_ like a good idea that shouldn't be fundamentally hard. Linus ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: gitk (was Re: Linux v2.6.12-rc6) 2005-06-08 23:16 ` gitk (was Re: Linux v2.6.12-rc6) Linus Torvalds @ 2005-06-10 10:57 ` Paul Mackerras 0 siblings, 0 replies; 2+ messages in thread From: Paul Mackerras @ 2005-06-10 10:57 UTC (permalink / raw) To: Linus Torvalds; +Cc: Git Mailing List Linus Torvalds writes: > and it would be cool if the "filename list" panel on the right side > colorized the names by these things (only three cases - leave the "not > touched" files off entirely, of course). Hmmm. How about this: each parent is given a color, and the file names are colored according to which parent they differ in. If a file differs in more than one parent it gets listed more than once in the colors for the parents in which it differs, with those entries being consecutive in the list. If instead I list the file once in yet another color, I don't see how to make it intuitively obvious that that's what the color means, and I get a combinatorial explosion in the number of colors required as the number of parents grows (I would potentially need 2^n - 1 colors for n parents). > Also, it should actually possible to do a diff for these things with just > doing a "diff3" on the two parents and on the merge result (diff3 normally > expects the "original", but hey, the "original" might as well be the > result), and thus color a merge file by whether the lines came from one > side or the other or both (or neither, which would be a manual merge > fixup). I already have code in dirdiff to display n-way diffs in a single window, so it's certainly doable. I think I will do it a little differently in this case, though, because the final result has a special status. If I color lines according to which parent(s) they are present in and then have some other way to show which version was chosen (maybe a black box around those lines? or a little tick (check mark) or cross icon at the left hand edge of the line?) I think that should be pretty clear. (I'll need another color for the cases where the result is different to all of the parents, of course.) Sounds interesting. I'll have a look at it. Paul. ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-06-10 10:53 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <Pine.LNX.4.58.0506061104190.1876@ppc970.osdl.org> [not found] ` <20050607130535.GD16602@harddisk-recovery.com> [not found] ` <Pine.LNX.4.58.0506070820170.2286@ppc970.osdl.org> [not found] ` <17062.21286.601768.751853@cargo.ozlabs.ibm.com> 2005-06-08 23:16 ` gitk (was Re: Linux v2.6.12-rc6) Linus Torvalds 2005-06-10 10:57 ` Paul Mackerras
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).