git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/8] config: Trivial rename in preparation for parseopt.
@ 2009-02-15  9:00 Felipe Contreras
  2009-02-15  9:00 ` [PATCH 2/8] config: Cleanup config file handling Felipe Contreras
  0 siblings, 1 reply; 19+ messages in thread
From: Felipe Contreras @ 2009-02-15  9:00 UTC (permalink / raw)
  To: git; +Cc: Johannes Schindelin, Junio C Hamano, Felipe Contreras

As suggested by Johannes Schindelin.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 builtin-config.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/builtin-config.c b/builtin-config.c
index 6937eaf..bf8df58 100644
--- a/builtin-config.c
+++ b/builtin-config.c
@@ -178,6 +178,7 @@ static char *normalize_value(const char *key, const char *value)
 
 static int get_color_found;
 static const char *get_color_slot;
+static const char *get_colorbool_slot;
 static char parsed_color[COLOR_MAXLEN];
 
 static int git_get_color_config(const char *var, const char *value, void *cb)
@@ -231,7 +232,7 @@ static int get_diff_color_found;
 static int git_get_colorbool_config(const char *var, const char *value,
 		void *cb)
 {
-	if (!strcmp(var, get_color_slot)) {
+	if (!strcmp(var, get_colorbool_slot)) {
 		get_colorbool_found =
 			git_config_colorbool(var, value, stdout_is_tty);
 	}
@@ -263,11 +264,11 @@ static int get_colorbool(int argc, const char **argv)
 		usage(git_config_set_usage);
 	get_colorbool_found = -1;
 	get_diff_color_found = -1;
-	get_color_slot = argv[0];
+	get_colorbool_slot = argv[0];
 	git_config(git_get_colorbool_config, NULL);
 
 	if (get_colorbool_found < 0) {
-		if (!strcmp(get_color_slot, "color.diff"))
+		if (!strcmp(get_colorbool_slot, "color.diff"))
 			get_colorbool_found = get_diff_color_found;
 		if (get_colorbool_found < 0)
 			get_colorbool_found = git_use_color_default;
-- 
1.6.1.3

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2009-02-16  1:17 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-15  9:00 [PATCH 1/8] config: Trivial rename in preparation for parseopt Felipe Contreras
2009-02-15  9:00 ` [PATCH 2/8] config: Cleanup config file handling Felipe Contreras
2009-02-15  9:00   ` [PATCH 3/8] config: Use parseopt Felipe Contreras
2009-02-15  9:00     ` [PATCH 4/8] config: Improve variable 'type' handling Felipe Contreras
2009-02-15  9:00       ` [PATCH 5/8] config: Disallow multiple config file locations Felipe Contreras
2009-02-15  9:00         ` [PATCH 6/8] config: Don't allow extra arguments for -e or -l Felipe Contreras
2009-02-15  9:00           ` [PATCH 7/8] config: Don't return negative exit codes Felipe Contreras
2009-02-15  9:01             ` [PATCH 8/8] config: Codestyle cleanups Felipe Contreras
2009-02-15 12:22             ` [PATCH 7/8] config: Don't return negative exit codes Johannes Schindelin
2009-02-15 12:39               ` Felipe Contreras
2009-02-15 13:30                 ` Felipe Contreras
2009-02-15 12:26         ` [PATCH 5/8] config: Disallow multiple config file locations Johannes Schindelin
2009-02-15 12:44           ` Felipe Contreras
2009-02-15 13:35             ` Felipe Contreras
2009-02-15 12:24       ` [PATCH 4/8] config: Improve variable 'type' handling Johannes Schindelin
2009-02-15 12:43         ` Felipe Contreras
2009-02-15 13:34           ` Felipe Contreras
2009-02-15 20:15   ` [PATCH 2/8] config: Cleanup config file handling Jeff King
2009-02-16  1:15   ` Junio C Hamano

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).