From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH] Checking for "diff.color." should come before "diff.color"
Date: Mon, 23 Oct 2006 20:51:17 +0100 [thread overview]
Message-ID: <200610232051.17396.andyparkins@gmail.com> (raw)
In git_diff_ui_config() the strncmp() for "diff.color" would have matched for
"diff.color.", so "diff.color." configs would never be processed.
Fix is to move "diff.color." check before "diff.color"
Signed-off-by: Andy Parkins <andyparkins@gmail.com>
---
diff.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/diff.c b/diff.c
index 3315378..d795be4 100644
--- a/diff.c
+++ b/diff.c
@@ -60,10 +60,6 @@ int git_diff_ui_config(const char *var,
diff_rename_limit_default = git_config_int(var, value);
return 0;
}
- if (!strcmp(var, "diff.color")) {
- diff_use_color_default = git_config_colorbool(var, value);
- return 0;
- }
if (!strcmp(var, "diff.renames")) {
if (!value)
diff_detect_rename_default = DIFF_DETECT_RENAME;
@@ -79,6 +75,10 @@ int git_diff_ui_config(const char *var,
color_parse(value, var, diff_colors[slot]);
return 0;
}
+ if (!strcmp(var, "diff.color")) {
+ diff_use_color_default = git_config_colorbool(var, value);
+ return 0;
+ }
return git_default_config(var, value);
}
--
1.4.2.3
next reply other threads:[~2006-10-23 19:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-23 19:51 Andy Parkins [this message]
2006-10-23 20:29 ` [PATCH] Checking for "diff.color." should come before "diff.color" Jeff King
2006-10-23 20:52 ` Andy Parkins
2006-10-23 21:57 ` Jeff King
[not found] ` <7vk62qydvu.fsf@assigned-by-dhcp.cox.net>
2006-10-23 21:03 ` Andy Parkins
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=200610232051.17396.andyparkins@gmail.com \
--to=andyparkins@gmail.com \
--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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.