From: Tilman Vogel Date: Fri, 21 Jan 2011 10:59:45 +0000 (+0100) Subject: git-gui: add config value gui.diffopts for passing additional diff options X-Git-Tag: gitgui-0.16.0~7 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=54531e7c7aeca965c23e60a6805059826a8de75a;p=git.git git-gui: add config value gui.diffopts for passing additional diff options Signed-off-by: Tilman Vogel Signed-off-by: Pat Thoyts --- diff --git a/git-gui.sh b/git-gui.sh index 789c177b3..c190cbe23 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -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) {} diff --git a/lib/diff.tcl b/lib/diff.tcl index f5ed5d1dc..ec4405567 100644 --- a/lib/diff.tcl +++ b/lib/diff.tcl @@ -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)" } diff --git a/lib/option.tcl b/lib/option.tcl index 719103a42..fb0677675 100644 --- a/lib/option.tcl +++ b/lib/option.tcl @@ -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"}}