From: Tilman Vogel <tilman.vogel@web.de>
To: git@vger.kernel.org
Cc: Tilman Vogel <tilman.vogel@web.de>
Subject: [PATCH] git-gui: add config value gui.diffopts for passing additional diff options
Date: Fri, 21 Jan 2011 11:59:45 +0100 [thread overview]
Message-ID: <1295607585-15971-1-git-send-email-tilman.vogel@web.de> (raw)
Signed-off-by: Tilman Vogel <tilman.vogel@web.de>
---
Documentation/config.txt | 4 ++++
git-gui/git-gui.sh | 1 +
git-gui/lib/diff.tcl | 1 +
git-gui/lib/option.tcl | 1 +
4 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index ff7c225..0ed7bcf 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -1100,6 +1100,10 @@ gui.diffcontext::
Specifies how many context lines should be used in calls to diff
made by the linkgit:git-gui[1]. The default is "5".
+gui.diffopts::
+ Specifies additional parameters to pass to diff from
+ linkgit:git-gui[1]. The default is "".
+
gui.encoding::
Specifies the default encoding to use for displaying of
file contents in linkgit:git-gui[1] and linkgit:gitk[1].
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index d3acf0d..2a3aed5 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -823,6 +823,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/git-gui/lib/diff.tcl b/git-gui/lib/diff.tcl
index dcf0711..de3827a 100644
--- a/git-gui/lib/diff.tcl
+++ b/git-gui/lib/diff.tcl
@@ -295,6 +295,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/git-gui/lib/option.tcl b/git-gui/lib/option.tcl
index 3807c8d..1e5d28c 100644
--- a/git-gui/lib/option.tcl
+++ b/git-gui/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"}}
--
1.7.3.4
next reply other threads:[~2011-01-21 11:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-21 10:59 Tilman Vogel [this message]
2011-01-25 0:25 ` [PATCH] git-gui: add config value gui.diffopts for passing additional diff options Pat Thoyts
2011-01-28 0:19 ` Tilman Vogel
2011-01-28 7:29 ` Johannes Sixt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1295607585-15971-1-git-send-email-tilman.vogel@web.de \
--to=tilman.vogel@web.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).