path: root/builtin/branch.c
diff options
authorJeff King <>2011-08-18 05:03:48 (GMT)
committerJunio C Hamano <>2011-08-18 21:48:29 (GMT)
commite269eb7946d0a4ba6a4e175133b5479446ac04a5 (patch)
tree65da98cebb4776458fa7944ba7101c2f4149f1f7 /builtin/branch.c
parentf1c9626105d5e4962a5ccaa4620114d03f32ad02 (diff)
git_config_colorbool: refactor stdout_is_tty handling
Usually this function figures out for itself whether stdout is a tty. However, it has an extra parameter just to allow git-config to override the auto-detection for its --get-colorbool option. Instead of an extra parameter, let's just use a global variable. This makes calling easier in the common case, and will make refactoring the colorbool code much simpler. Signed-off-by: Jeff King <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin/branch.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/branch.c b/builtin/branch.c
index 3142daa..b15fee5 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -71,7 +71,7 @@ static int parse_branch_color_slot(const char *var, int ofs)
static int git_branch_config(const char *var, const char *value, void *cb)
if (!strcmp(var, "color.branch")) {
- branch_use_color = git_config_colorbool(var, value, -1);
+ branch_use_color = git_config_colorbool(var, value);
return 0;
if (!prefixcmp(var, "color.branch.")) {