From 000f97bd11e94fa8ede7fcdb43f5633997fed672 Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Thu, 26 May 2011 13:43:21 -0700 Subject: builtin/commit.c: set status_format _after_ option parsing 'git status' should use --porcelain output format when -z is given. It was not doing so since the _effect_ of using -z, namely that null_termination would be set, was being checked _before_ option parsing was performed. So, move the check so that it is performed after option parsing. Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- builtin-commit.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'builtin-commit.c') diff --git a/builtin-commit.c b/builtin-commit.c index f2fd0a4580..9e7208f729 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -1039,14 +1039,15 @@ int cmd_status(int argc, const char **argv, const char *prefix) OPT_END(), }; - if (null_termination && status_format == STATUS_FORMAT_LONG) - status_format = STATUS_FORMAT_PORCELAIN; - wt_status_prepare(&s); git_config(git_status_config, &s); 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 (*argv) -- cgit v1.2.3