]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/commit.c
want_color: automatically fallback to color.ui
[thirdparty/git.git] / builtin / commit.c
index 295803a265fbf04345af6b98af8f28873735143f..9763146b6f224b32e56d3d67b0750b56a989b6cf 100644 (file)
@@ -1237,10 +1237,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:
@@ -1394,15 +1390,10 @@ 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;
        argc = parse_and_validate_options(argc, argv, builtin_commit_usage,
                                          prefix, &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, &s);
-       }
        index_file = prepare_index(argc, argv, prefix, 0);
 
        /* Set up everything for writing the commit object.  This includes