git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: Paul Mackerras <paulus@samba.org>, git@vger.kernel.org
Subject: gitk changing line color for no reason after merge
Date: Thu, 02 Feb 2006 12:21:37 -0500	[thread overview]
Message-ID: <1138900897.28967.18.camel@dv> (raw)

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

             reply	other threads:[~2006-02-02 17:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-02 17:21 Pavel Roskin [this message]
2006-02-07  5:18 ` gitk changing line color for no reason after merge 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1138900897.28967.18.camel@dv \
    --to=proski@gnu.org \
    --cc=git@vger.kernel.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).