git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>
Subject: Re: Gitk strangeness..
Date: Wed, 29 Mar 2006 09:51:34 +1100	[thread overview]
Message-ID: <17449.48630.370867.10251@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <7vzmjbj9a1.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano writes:

> How about this alternative patch, then?  It turned out to be
> quite convoluted as I feared.

That's brilliant.  Thank you!  With the patch to gitk below, the
graph display on Linus' example looks much saner.

Could you check in your patch to the git.git repository, please?

Thanks,
Paul.

diff --git a/gitk b/gitk
index 03cd475..1989aa5 100755
--- a/gitk
+++ b/gitk
@@ -46,7 +46,7 @@ proc start_rev_list {rlargs} {
     }
     if {[catch {
 	set commfd [open [concat | git-rev-list --header $order \
-			      --parents $rlargs] r]
+			      --parents --boundary $rlargs] r]
     } err]} {
 	puts stderr "Error executing git-rev-list: $err"
 	exit 1
@@ -114,8 +114,13 @@ proc getcommitlines {commfd}  {
 	set start [expr {$i + 1}]
 	set j [string first "\n" $cmit]
 	set ok 0
+	set listed 1
 	if {$j >= 0} {
 	    set ids [string range $cmit 0 [expr {$j - 1}]]
+	    if {[string range $ids 0 0] == "-"} {
+		set listed 0
+		set ids [string range $ids 1 end]
+	    }
 	    set ok 1
 	    foreach id $ids {
 		if {[string length $id] != 40} {
@@ -133,8 +138,12 @@ proc getcommitlines {commfd}  {
 	    exit 1
 	}
 	set id [lindex $ids 0]
-	set olds [lrange $ids 1 end]
-	set commitlisted($id) 1
+	if {$listed} {
+	    set olds [lrange $ids 1 end]
+	    set commitlisted($id) 1
+	} else {
+	    set olds {}
+	}
 	updatechildren $id $olds
 	set commitdata($id) [string range $cmit [expr {$j + 1}] end]
 	set commitrow($id) $commitidx

  reply	other threads:[~2006-03-28 22:52 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-28  0:28 What's in git.git Junio C Hamano
2006-03-28  1:15 ` [PATCH] Add ALL_LDFLAGS to the git target Jason Riedy
2006-03-28  1:25   ` Junio C Hamano
2006-03-28  3:11     ` Jason Riedy
2006-03-28  6:21       ` Junio C Hamano
2006-03-28 19:46         ` Jason Riedy
2006-03-28 22:48           ` Mark Wooding
2006-03-28 23:03             ` Linus Torvalds
2006-03-28 23:20               ` Junio C Hamano
2006-03-28 23:59                 ` Jason Riedy
2006-03-29  0:01                   ` Junio C Hamano
2006-03-28 23:21               ` Mark Wooding
2006-03-29  0:16               ` [PATCH] Support for pickaxe matching regular expressions Petr Baudis
2006-03-29 13:09                 ` Petr Baudis
2006-03-29 11:42             ` [PATCH] Add ALL_LDFLAGS to the git target Johannes Schindelin
2006-03-28  2:05 ` Gitk strangeness Linus Torvalds
2006-03-28  2:12   ` Junio C Hamano
2006-03-28  2:31   ` Paul Mackerras
2006-03-28  2:52     ` Linus Torvalds
2006-03-28  2:54     ` Junio C Hamano
2006-03-28  4:31       ` Paul Mackerras
2006-03-28  5:38         ` Junio C Hamano
2006-03-28  6:18           ` Paul Mackerras
2006-03-28  7:52             ` Junio C Hamano
2006-03-28 22:51               ` Paul Mackerras [this message]
2006-03-29  0:50                 ` Junio C Hamano
2006-03-29  6:41                 ` Junio C Hamano
2006-03-30 20:57                 ` Alex Riesen
2006-03-30 22:33                   ` Paul Mackerras
2006-03-30 23:46                   ` Paul Mackerras
2006-03-31  1:50                     ` Junio C Hamano
2006-03-31  6:27                     ` Alex Riesen
2006-03-28  2:57     ` Linus Torvalds

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=17449.48630.370867.10251@cargo.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=torvalds@osdl.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).