summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/commit.c')
-rw-r--r--builtin/commit.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index 05029d40..cbc9613 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -1141,7 +1141,7 @@ static int git_status_config(const char *k, const char *v, void *cb)
return 0;
}
if (!strcmp(k, "status.color") || !strcmp(k, "color.status")) {
- s->use_color = git_config_colorbool(k, v, -1);
+ s->use_color = git_config_colorbool(k, v);
return 0;
}
if (!prefixcmp(k, "status.color.") || !prefixcmp(k, "color.status.")) {
@@ -1234,10 +1234,6 @@ int cmd_status(int argc, const char **argv, const char *prefix)
if (s.relative_paths)
s.prefix = prefix;
- if (s.use_color == -1)
- s.use_color = git_use_color_default;
- if (diff_use_color_default == -1)
- diff_use_color_default = git_use_color_default;
switch (status_format) {
case STATUS_FORMAT_SHORT:
@@ -1393,8 +1389,6 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
git_config(git_commit_config, &s);
determine_whence(&s);
- if (s.use_color == -1)
- s.use_color = git_use_color_default;
if (get_sha1("HEAD", sha1))
current_head = NULL;
else {
@@ -1404,11 +1398,8 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
}
argc = parse_and_validate_options(argc, argv, builtin_commit_usage,
prefix, current_head, &s);
- if (dry_run) {
- if (diff_use_color_default == -1)
- diff_use_color_default = git_use_color_default;
+ if (dry_run)
return dry_run_commit(argc, argv, prefix, current_head, &s);
- }
index_file = prepare_index(argc, argv, prefix, current_head, 0);
/* Set up everything for writing the commit object. This includes