summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f029427)
raw | patch | inline | side by side (parent: f029427)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Mon, 17 Dec 2007 13:42:20 +0000 (13:42 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 18 Dec 2007 04:49:18 +0000 (20:49 -0800) |
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
file since its conception, but failed to respect it.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c | patch | blob | history |
index 08ec66c7945fb330d289f9e579a162e9217a16eb..e26584cdfc2476ba84ccf5ffb43736a8f280df9b 100644 (file)
--- a/diff.c
+++ b/diff.c
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] = {
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, '.');
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;
}