gitk: Get rid of the diffopts variable
The only thing that could be specified with diffopts was the number of lines of context, but there is already a spinbox for that. So this gets rid of it. Signed-off-by: Paul Mackerras <paulus@samba.org>maint
parent
308ff3d59d
commit
8d73b242a5
19
gitk
19
gitk
|
@ -5119,14 +5119,13 @@ proc getblobline {bf id} {
|
||||||
}
|
}
|
||||||
|
|
||||||
proc mergediff {id l} {
|
proc mergediff {id l} {
|
||||||
global diffmergeid diffopts mdifffd
|
global diffmergeid mdifffd
|
||||||
global diffids
|
global diffids
|
||||||
global parentlist
|
global parentlist
|
||||||
|
|
||||||
set diffmergeid $id
|
set diffmergeid $id
|
||||||
set diffids $id
|
set diffids $id
|
||||||
# this doesn't seem to actually affect anything...
|
# this doesn't seem to actually affect anything...
|
||||||
set env(GIT_DIFF_OPTS) $diffopts
|
|
||||||
set cmd [concat | git diff-tree --no-commit-id --cc $id]
|
set cmd [concat | git diff-tree --no-commit-id --cc $id]
|
||||||
if {[catch {set mdf [open $cmd r]} err]} {
|
if {[catch {set mdf [open $cmd r]} err]} {
|
||||||
error_popup "Error getting merge diffs: $err"
|
error_popup "Error getting merge diffs: $err"
|
||||||
|
@ -5333,11 +5332,10 @@ proc diffcontextchange {n1 n2 op} {
|
||||||
}
|
}
|
||||||
|
|
||||||
proc getblobdiffs {ids} {
|
proc getblobdiffs {ids} {
|
||||||
global diffopts blobdifffd diffids env
|
global blobdifffd diffids env
|
||||||
global diffinhdr treediffs
|
global diffinhdr treediffs
|
||||||
global diffcontext
|
global diffcontext
|
||||||
|
|
||||||
set env(GIT_DIFF_OPTS) $diffopts
|
|
||||||
if {[catch {set bdf [open [diffcmd $ids "-p -C --no-commit-id -U$diffcontext"] r]} err]} {
|
if {[catch {set bdf [open [diffcmd $ids "-p -C --no-commit-id -U$diffcontext"] r]} err]} {
|
||||||
puts "error getting diffs: $err"
|
puts "error getting diffs: $err"
|
||||||
return
|
return
|
||||||
|
@ -8000,7 +7998,7 @@ proc chg_fontparam {v sub op} {
|
||||||
}
|
}
|
||||||
|
|
||||||
proc doprefs {} {
|
proc doprefs {} {
|
||||||
global maxwidth maxgraphpct diffopts
|
global maxwidth maxgraphpct
|
||||||
global oldprefs prefstop showneartags showlocalchanges
|
global oldprefs prefstop showneartags showlocalchanges
|
||||||
global bgcolor fgcolor ctext diffcolors selectbgcolor
|
global bgcolor fgcolor ctext diffcolors selectbgcolor
|
||||||
global uifont tabstop
|
global uifont tabstop
|
||||||
|
@ -8011,7 +8009,7 @@ proc doprefs {} {
|
||||||
raise $top
|
raise $top
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
foreach v {maxwidth maxgraphpct diffopts showneartags showlocalchanges} {
|
foreach v {maxwidth maxgraphpct showneartags showlocalchanges} {
|
||||||
set oldprefs($v) [set $v]
|
set oldprefs($v) [set $v]
|
||||||
}
|
}
|
||||||
toplevel $top
|
toplevel $top
|
||||||
|
@ -8037,10 +8035,6 @@ proc doprefs {} {
|
||||||
label $top.ddisp -text "Diff display options"
|
label $top.ddisp -text "Diff display options"
|
||||||
$top.ddisp configure -font uifont
|
$top.ddisp configure -font uifont
|
||||||
grid $top.ddisp - -sticky w -pady 10
|
grid $top.ddisp - -sticky w -pady 10
|
||||||
label $top.diffoptl -text "Options for diff program" \
|
|
||||||
-font optionfont
|
|
||||||
entry $top.diffopt -width 20 -textvariable diffopts
|
|
||||||
grid x $top.diffoptl $top.diffopt -sticky w
|
|
||||||
frame $top.ntag
|
frame $top.ntag
|
||||||
label $top.ntag.l -text "Display nearby tags" -font optionfont
|
label $top.ntag.l -text "Display nearby tags" -font optionfont
|
||||||
checkbutton $top.ntag.b -variable showneartags
|
checkbutton $top.ntag.b -variable showneartags
|
||||||
|
@ -8141,10 +8135,10 @@ proc setfg {c} {
|
||||||
}
|
}
|
||||||
|
|
||||||
proc prefscan {} {
|
proc prefscan {} {
|
||||||
global maxwidth maxgraphpct diffopts
|
global maxwidth maxgraphpct
|
||||||
global oldprefs prefstop showneartags showlocalchanges
|
global oldprefs prefstop showneartags showlocalchanges
|
||||||
|
|
||||||
foreach v {maxwidth maxgraphpct diffopts showneartags showlocalchanges} {
|
foreach v {maxwidth maxgraphpct showneartags showlocalchanges} {
|
||||||
set $v $oldprefs($v)
|
set $v $oldprefs($v)
|
||||||
}
|
}
|
||||||
catch {destroy $prefstop}
|
catch {destroy $prefstop}
|
||||||
|
@ -8479,7 +8473,6 @@ proc tcl_encoding {enc} {
|
||||||
|
|
||||||
# defaults...
|
# defaults...
|
||||||
set datemode 0
|
set datemode 0
|
||||||
set diffopts "-U 5 -p"
|
|
||||||
set wrcomcmd "git diff-tree --stdin -p --pretty"
|
set wrcomcmd "git diff-tree --stdin -p --pretty"
|
||||||
|
|
||||||
set gitencoding {}
|
set gitencoding {}
|
||||||
|
|
Loading…
Reference in New Issue