Code

git-gui: add config value gui.diffopts for passing additional diff options
authorTilman Vogel <tilman.vogel@web.de>
Fri, 21 Jan 2011 10:59:45 +0000 (11:59 +0100)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Sat, 5 Nov 2011 00:38:01 +0000 (00:38 +0000)
Signed-off-by: Tilman Vogel <tilman.vogel@web.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui.sh
lib/diff.tcl
lib/option.tcl

index 789c177b3b2eeb90a61ec94fd3b5e0f03773fa63..c190cbe23f0c67f3866311506e4c5eaf47c87e80 100755 (executable)
@@ -850,6 +850,7 @@ set default_config(gui.fastcopyblame) false
 set default_config(gui.copyblamethreshold) 40
 set default_config(gui.blamehistoryctx) 7
 set default_config(gui.diffcontext) 5
+set default_config(gui.diffopts) {}
 set default_config(gui.commitmsgwidth) 75
 set default_config(gui.newbranchtemplate) {}
 set default_config(gui.spellingdictionary) {}
index f5ed5d1dc66844fb58a2605285eb460fe14112a4..ec4405567a9b86a9bfd8bf50815b3c9c14e2df40 100644 (file)
@@ -309,6 +309,7 @@ proc start_show_diff {cont_info {add_opts {}}} {
 
        lappend cmd -p
        lappend cmd --color
+       set cmd [concat $cmd $repo_config(gui.diffopts)]
        if {$repo_config(gui.diffcontext) >= 1} {
                lappend cmd "-U$repo_config(gui.diffcontext)"
        }
index 719103a4220cd3b84734c37e78e32773a8f23a47..fb0677675ad7eddc4187cc00d0e8e039050b80e2 100644 (file)
@@ -153,6 +153,7 @@ proc do_options {} {
                {i-20..200 gui.copyblamethreshold {mc "Minimum Letters To Blame Copy On"}}
                {i-0..300 gui.blamehistoryctx {mc "Blame History Context Radius (days)"}}
                {i-1..99 gui.diffcontext {mc "Number of Diff Context Lines"}}
+               {t gui.diffopts {mc "Additional Diff Parameters"}}
                {i-0..99 gui.commitmsgwidth {mc "Commit Message Text Width"}}
                {t gui.newbranchtemplate {mc "New Branch Name Template"}}
                {c gui.encoding {mc "Default File Contents Encoding"}}