gitk changing line color for no reason after merge
- From
- Pavel Roskin <proski@gnu.org>
- Date
- Feb 2, 2006, 17:21 UTC
- Message-ID
- <1138900897.28967.18.camel@dv>
Hello, Paul!
I have noticed that gitk changes the line color at a commit following a merge (i.e. a commit with many parents). I made this screenshot to demonstrate the problem:
http://red-bean.com/proski/gitk/gitk.png
If you follow the leftmost line, you'll see how green becomes red, gray becomes brown and red becomes blue.
I think it would be much better if line colors only change at non-trivial nodes, i.e. those with more than one child or parent.
The fix is trivial:
diff --git a/gitk b/gitk index f12b3ce..14ff570 100755 --- a/gitk +++ b/gitk @@ -770,7 +770,7 @@ proc assigncolor {id} { if [info exists colormap($id)] return set ncolors [llength $colors] - if {$nparents($id) <= 1 && $nchildren($id) == 1} { + if {$nchildren($id) == 1} { set child [lindex $children($id) 0] if {[info exists colormap($child)] && $nparents($child) == 1} { I checked the history of gitk and could trace this code back to the first version of gitk in the git repository. Maybe it was intended this way, but I think it would be better to fix it.
-- Regards, Pavel Roskin