gitk: Use the new --boundary flag to git-rev-list
With this, we can show the boundary (open-circle) commits immediately after their last child, which looks much better than putting all the boundary commits at the bottom of the graph. Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras committed
Mar 30, 2006 at 18:43 UTC
16c1ff968ac9717c958129eb05aa089cc0ca51e7
1 file changed
+12
-3
gitk
+12
-3
@@ -46,7 +46,7 @@ proc start_rev_list {rlargs} {
46
}
47
if {[catch {
48
set commfd [open [concat | git-rev-list --header $order \
49
- --parents $rlargs] r]
49
+ --parents --boundary $rlargs] r]
50
} err]} {
51
puts stderr "Error executing git-rev-list: $err"
52
exit 1
@@ -114,8 +114,13 @@ proc getcommitlines {commfd} {
114
set start [expr {$i + 1}]
115
set j [string first "\n" $cmit]
116
set ok 0
117
+ set listed 1
118
if {$j >= 0} {
119
set ids [string range $cmit 0 [expr {$j - 1}]]
120
+ if {[string range $ids 0 0] == "-"} {
121
+ set listed 0
122
+ set ids [string range $ids 1 end]
123
+ }
124
set ok 1
125
foreach id $ids {
126
if {[string length $id] != 40} {
@@ -133,8 +138,12 @@ proc getcommitlines {commfd} {
138
exit 1
139
}
140
set id [lindex $ids 0]
136
- set olds [lrange $ids 1 end]
137
- set commitlisted($id) 1
141
+ if {$listed} {
142
+ set olds [lrange $ids 1 end]
143
+ set commitlisted($id) 1
144
+ } else {
145
+ set olds {}
146
+ }
147
updatechildren $id $olds
148
set commitdata($id) [string range $cmit [expr {$j + 1}] end]
149
set commitrow($id) $commitidx