git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* gitk changing line color for no reason after merge
@ 2006-02-02 17:21 Pavel Roskin
  2006-02-07  5:18 ` Pavel Roskin
  0 siblings, 1 reply; 8+ messages in thread
From: Pavel Roskin @ 2006-02-02 17:21 UTC (permalink / raw)
  To: Paul Mackerras, git

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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-02-08 21:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-02 17:21 gitk changing line color for no reason after merge Pavel Roskin
2006-02-07  5:18 ` Pavel Roskin
2006-02-07  8:56   ` Paul Mackerras
2006-02-08  1:10     ` Pavel Roskin
2006-02-07 10:04   ` Junio C Hamano
2006-02-08  0:54     ` Pavel Roskin
2006-02-08  2:30       ` Paul Mackerras
2006-02-08 21:06         ` Pavel Roskin

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).