Browse Source

Merge with gitk.

maint
Junio C Hamano 20 years ago
parent
commit
80bd6f3064
  1. 14
      gitk

14
gitk

@ -1729,7 +1729,9 @@ proc mergediff {id} {
set diffpindex -1 set diffpindex -1
set diffmergegca [findgca $parents($id)] set diffmergegca [findgca $parents($id)]
if {[info exists mergefilelist($id)]} { if {[info exists mergefilelist($id)]} {
showmergediff if {$mergefilelist($id) ne {}} {
showmergediff
}
} else { } else {
contmergediff {} contmergediff {}
} }
@ -1753,7 +1755,7 @@ proc findgca {ids} {


proc contmergediff {ids} { proc contmergediff {ids} {
global diffmergeid diffpindex parents nparents diffmergegca global diffmergeid diffpindex parents nparents diffmergegca
global treediffs mergefilelist diffids global treediffs mergefilelist diffids treepending


# diff the child against each of the parents, and diff # diff the child against each of the parents, and diff
# each of the parents against the GCA. # each of the parents against the GCA.
@ -1814,8 +1816,8 @@ proc contmergediff {ids} {


proc showmergediff {} { proc showmergediff {} {
global cflist diffmergeid mergefilelist parents global cflist diffmergeid mergefilelist parents
global diffopts diffinhunk currentfile diffblocked global diffopts diffinhunk currentfile currenthunk filelines
global groupfilelast mergefds global diffblocked groupfilelast mergefds groupfilenum grouphunks


set files $mergefilelist($diffmergeid) set files $mergefilelist($diffmergeid)
foreach f $files { foreach f $files {
@ -1826,6 +1828,8 @@ proc showmergediff {} {
catch {unset currentfile} catch {unset currentfile}
catch {unset currenthunk} catch {unset currenthunk}
catch {unset filelines} catch {unset filelines}
catch {unset groupfilenum}
catch {unset grouphunks}
set groupfilelast -1 set groupfilelast -1
foreach p $parents($diffmergeid) { foreach p $parents($diffmergeid) {
set cmd [list | git-diff-tree -p $p $diffmergeid] set cmd [list | git-diff-tree -p $p $diffmergeid]
@ -2700,7 +2704,7 @@ proc diffvssel {dirn} {
$ctext conf -state disabled $ctext conf -state disabled
$ctext tag delete Comments $ctext tag delete Comments
$ctext tag remove found 1.0 end $ctext tag remove found 1.0 end
startdiff $newid [list $oldid] startdiff [list $newid $oldid]
} }


proc mkpatch {} { proc mkpatch {} {

Loading…
Cancel
Save