From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: "Schuberth, Sebastian" <sschuberth@visageimaging.com>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: [PATCH] Actually add config variable diff.external
Date: Mon, 17 Dec 2007 13:42:20 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.64.0712171341110.9446@racer.site> (raw)
In-Reply-To: <Pine.LNX.4.64.0712171220540.9446@racer.site>
We had the diff.external variable in the documentation of the config
file since its conception, but failed to respect it.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
On Mon, 17 Dec 2007, Johannes Schindelin wrote:
> Subject: [PATCH] Document diff.external and mergetool.<tool>.path
>
> There was no documentation for the config variables
> diff.external and mergetool.<tool>.path.
Heh. Missed that diff.external was actually never implemented...
Also noticed by Sebastian.
diff.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/diff.c b/diff.c
index 7d17754..a49c36a 100644
--- a/diff.c
+++ b/diff.c
@@ -20,6 +20,7 @@
static int diff_detect_rename_default;
static int diff_rename_limit_default = 100;
static int diff_use_color_default;
+static const char *external_diff_cmd_cfg;
int diff_auto_refresh_index = 1;
static char diff_colors[][COLOR_MAXLEN] = {
@@ -163,6 +164,10 @@ int git_diff_ui_config(const char *var, const char *value)
diff_auto_refresh_index = git_config_bool(var, value);
return 0;
}
+ if (!strcmp(var, "diff.external")) {
+ external_diff_cmd_cfg = xstrdup(value);
+ return 0;
+ }
if (!prefixcmp(var, "diff.")) {
const char *ep = strrchr(var, '.');
@@ -209,6 +214,8 @@ static const char *external_diff(void)
if (done_preparing)
return external_diff_cmd;
external_diff_cmd = getenv("GIT_EXTERNAL_DIFF");
+ if (!external_diff_cmd)
+ external_diff_cmd = external_diff_cmd_cfg;
done_preparing = 1;
return external_diff_cmd;
}
--
1.5.4.rc0.59.g1d10d
next prev parent reply other threads:[~2007-12-17 13:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E6DFE65BB5ADFE44BE13CCC976124447D5BB8D@fue-email2.ad.mc.com>
2007-12-17 12:21 ` [PATCH] Document diff.external and mergetool.<tool>.path Johannes Schindelin
2007-12-17 13:42 ` Johannes Schindelin [this message]
2007-12-18 0:13 ` Junio C Hamano
2007-12-18 0:47 ` Johannes Schindelin
2007-12-18 0:52 ` Junio C Hamano
2007-12-18 1:00 ` Johannes Schindelin
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0712171341110.9446@racer.site \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sschuberth@visageimaging.com \
/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.
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 NNTP newsgroup(s).