]> git.ipfire.org Git - thirdparty/git.git/commitdiff
commit: make it work with status.short
authorRamkumar Ramachandra <artagnon@gmail.com>
Mon, 24 Jun 2013 12:45:12 +0000 (18:15 +0530)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Jun 2013 17:25:49 +0000 (10:25 -0700)
With "status.short" set, it is now impossible to commit with
status.short set, because it acts like "git commit --short", and it
is impossible to differentiate between a status_format set by the
command-line option parser versus that set by the config parser.

To alleviate this problem, clear status_format as soon as the config
parser has finished its work.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/commit.c

index d6c8e204ee7eb52f56c3d3123af54d24ac397334..0da944fa4e3ad9aa46b9d22c9aed281dae01d267 100644 (file)
@@ -1441,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;