2165
$cflist delete 0 end
2166
$cflist insert end "Comments"
2167
if {$nparents($id) == 1} {
2168
- startdiff [concat $id $parents($id)]
2168
+ startdiff $id
2169
} elseif {$nparents($id) > 1} {
2170
mergediff $id
2171
}
2274
# diff the child against each of the parents, and diff
2275
# each of the parents against the GCA.
2276
while 1 {
2277
- if {[lindex $ids 0] == $diffmergeid && $diffmergegca ne {}} {
2278
- set ids [list [lindex $ids 1] $diffmergegca]
2277
+ if {[lindex $ids 1] == $diffmergeid && $diffmergegca ne {}} {
2278
+ set ids [list $diffmergegca [lindex $ids 0]]
2279
} else {
2280
if {[incr diffpindex] >= $nparents($diffmergeid)} break
2281
set p [lindex $parents($diffmergeid) $diffpindex]
2282
- set ids [list $diffmergeid $p]
2282
+ set ids [list $p $diffmergeid]
2283
}
2284
if {![info exists treediffs($ids)]} {
2285
set diffids $ids
2297
if {$diffmergegca ne {}} {
2298
set files {}
2299
foreach p $parents($diffmergeid) {
2300
- set gcadiffs $treediffs([list $p $diffmergegca])
2301
- foreach f $treediffs([list $diffmergeid $p]) {
2300
+ set gcadiffs $treediffs([list $diffmergegca $p])
2301
+ foreach f $treediffs([list $p $diffmergeid]) {
2302
if {[lsearch -exact $files $f] < 0
2303
&& [lsearch -exact $gcadiffs $f] >= 0} {
2304
lappend files $f
2311
set files $treediffs([list $diffmergeid $p])
2312
for {set i 1} {$i < $nparents($diffmergeid) && $files ne {}} {incr i} {
2313
set p [lindex $parents($diffmergeid) $i]
2314
- set df $treediffs([list $diffmergeid $p])
2314
+ set df $treediffs([list $p $diffmergeid])
2315
set nf {}
2316
foreach f $files {
2317
if {[lsearch -exact $df $f] >= 0} {
2788
global treediff parents treepending
2789
set treepending $ids
2790
set treediff {}
2791
- set id [lindex $ids 0]
2792
- if [catch {set gdtf [open "|git-diff-tree --no-commit-id -r $id" r]}] return
2791
+ if [catch {set gdtf [open [concat | git-diff-tree --no-commit-id -r $ids] r]}] return
2792
fconfigure $gdtf -blocking 0
2793
fileevent $gdtf readable [list gettreediffline $gdtf $ids]
2794
}
2821
global diffopts blobdifffd diffids env curdifftag curtagstart
2822
global difffilestart nextupdate diffinhdr treediffs
2823
2825
- set id [lindex $ids 0]
2824
set env(GIT_DIFF_OPTS) $diffopts
2827
- set cmd [list | git-diff-tree --no-commit-id -r -p -C $id]
2825
+ set cmd [concat | git-diff-tree --no-commit-id -r -p -C $ids]
2826
if {[catch {set bdf [open $cmd r]} err]} {
2827
puts "error getting diffs: $err"
2828
return
3339
$ctext conf -state disabled
3340
$ctext tag delete Comments
3341
$ctext tag remove found 1.0 end
3344
- startdiff [list $newid $oldid]
3342
+ startdiff [list $oldid $newid]
3343
}
3344
3345
proc mkpatch {} {