aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-06-06 11:40:08 -0700
committerJunio C Hamano <gitster@pobox.com>2011-06-06 11:40:08 -0700
commit6c92972d7f5ab247a8cab5e4b88cb281bf201970 (patch)
tree2a5100a10d4b91a59dea75ef73184142479c8963 /builtin
parenta6605d76cdad37ed3c55a7be4d2e0af0f4721bb2 (diff)
parent000f97bd11e94fa8ede7fcdb43f5633997fed672 (diff)
downloadgit-6c92972d7f5ab247a8cab5e4b88cb281bf201970.tar.gz
git-6c92972d7f5ab247a8cab5e4b88cb281bf201970.tar.xz
Merge branch 'bc/maint-status-z-to-use-porcelain'
* bc/maint-status-z-to-use-porcelain: builtin/commit.c: set status_format _after_ option parsing t7508: demonstrate status's failure to use --porcelain format with -z Conflicts: builtin/commit.c
Diffstat (limited to 'builtin')
-rw-r--r--builtin/commit.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index 5286432f3..e1af9b19f 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -1207,9 +1207,6 @@ int cmd_status(int argc, const char **argv, const char *prefix)
if (argc == 2 && !strcmp(argv[1], "-h"))
usage_with_options(builtin_status_usage, builtin_status_options);
- if (null_termination && status_format == STATUS_FORMAT_LONG)
- status_format = STATUS_FORMAT_PORCELAIN;
-
wt_status_prepare(&s);
gitmodules_config();
git_config(git_status_config, &s);
@@ -1217,6 +1214,10 @@ int cmd_status(int argc, const char **argv, const char *prefix)
argc = parse_options(argc, argv, prefix,
builtin_status_options,
builtin_status_usage, 0);
+
+ if (null_termination && status_format == STATUS_FORMAT_LONG)
+ status_format = STATUS_FORMAT_PORCELAIN;
+
handle_untracked_files_arg(&s);
if (show_ignored_in_status)
s.show_ignored_files = 1;