@matheusbsbs / matheus-bagliano / commits / 8d73b242a5
Fork 0

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>

Paul Mackerras committed Oct 6, 2007 at 20:22 UTC 8d73b242a53da9ea36800a8ff0f9993e5100ea24
1 file changed +6 -13
gitk
+6 -13
@@ -5119,14 +5119,13 @@ proc getblobline {bf id} {
5119 }
5120
5121 proc mergediff {id l} {
5122 - global diffmergeid diffopts mdifffd
5122 + global diffmergeid mdifffd
5123 global diffids
5124 global parentlist
5125
5126 set diffmergeid $id
5127 set diffids $id
5128 # this doesn't seem to actually affect anything...
5129 - set env(GIT_DIFF_OPTS) $diffopts
5129 set cmd [concat | git diff-tree --no-commit-id --cc $id]
5130 if {[catch {set mdf [open $cmd r]} err]} {
5131 error_popup "Error getting merge diffs: $err"
@@ -5333,11 +5332,10 @@ proc diffcontextchange {n1 n2 op} {
5332 }
5333
5334 proc getblobdiffs {ids} {
5336 - global diffopts blobdifffd diffids env
5335 + global blobdifffd diffids env
5336 global diffinhdr treediffs
5337 global diffcontext
5338
5340 - set env(GIT_DIFF_OPTS) $diffopts
5339 if {[catch {set bdf [open [diffcmd $ids "-p -C --no-commit-id -U$diffcontext"] r]} err]} {
5340 puts "error getting diffs: $err"
5341 return
@@ -8000,7 +7998,7 @@ proc chg_fontparam {v sub op} {
7998 }
7999
8000 proc doprefs {} {
8003 - global maxwidth maxgraphpct diffopts
8001 + global maxwidth maxgraphpct
8002 global oldprefs prefstop showneartags showlocalchanges
8003 global bgcolor fgcolor ctext diffcolors selectbgcolor
8004 global uifont tabstop
@@ -8011,7 +8009,7 @@ proc doprefs {} {
8009 raise $top
8010 return
8011 }
8014 - foreach v {maxwidth maxgraphpct diffopts showneartags showlocalchanges} {
8012 + foreach v {maxwidth maxgraphpct showneartags showlocalchanges} {
8013 set oldprefs($v) [set $v]
8014 }
8015 toplevel $top
@@ -8037,10 +8035,6 @@ proc doprefs {} {
8035 label $top.ddisp -text "Diff display options"
8036 $top.ddisp configure -font uifont
8037 grid $top.ddisp - -sticky w -pady 10
8040 - label $top.diffoptl -text "Options for diff program" \
8041 - -font optionfont
8042 - entry $top.diffopt -width 20 -textvariable diffopts
8043 - grid x $top.diffoptl $top.diffopt -sticky w
8038 frame $top.ntag
8039 label $top.ntag.l -text "Display nearby tags" -font optionfont
8040 checkbutton $top.ntag.b -variable showneartags
@@ -8141,10 +8135,10 @@ proc setfg {c} {
8135 }
8136
8137 proc prefscan {} {
8144 - global maxwidth maxgraphpct diffopts
8138 + global maxwidth maxgraphpct
8139 global oldprefs prefstop showneartags showlocalchanges
8140
8147 - foreach v {maxwidth maxgraphpct diffopts showneartags showlocalchanges} {
8141 + foreach v {maxwidth maxgraphpct showneartags showlocalchanges} {
8142 set $v $oldprefs($v)
8143 }
8144 catch {destroy $prefstop}
@@ -8479,7 +8473,6 @@ proc tcl_encoding {enc} {
8473
8474 # defaults...
8475 set datemode 0
8482 -set diffopts "-U 5 -p"
8476 set wrcomcmd "git diff-tree --stdin -p --pretty"
8477
8478 set gitencoding {}