]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/commit.c
commit: make it work with status.short
[thirdparty/git.git] / builtin / commit.c
index d2f30d960a71e41da88d6cc4201cbdca168b8648..0da944fa4e3ad9aa46b9d22c9aed281dae01d267 100644 (file)
@@ -1110,6 +1110,17 @@ static int git_status_config(const char *k, const char *v, void *cb)
                        s->submodule_summary = -1;
                return 0;
        }
+       if (!strcmp(k, "status.short")) {
+               if (git_config_bool(k, v))
+                       status_format = STATUS_FORMAT_SHORT;
+               else
+                       status_format = STATUS_FORMAT_NONE;
+               return 0;
+       }
+       if (!strcmp(k, "status.branch")) {
+               s->show_branch = git_config_bool(k, v);
+               return 0;
+       }
        if (!strcmp(k, "status.color") || !strcmp(k, "color.status")) {
                s->use_color = git_config_colorbool(k, v);
                return 0;
@@ -1430,6 +1441,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
        wt_status_prepare(&s);
        gitmodules_config();
        git_config(git_commit_config, &s);
+       status_format = STATUS_FORMAT_NONE; /* Ignore status.short */
        determine_whence(&s);
        s.colopts = 0;