summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin-commit.c7
-rwxr-xr-xt/t7508-status.sh2
2 files changed, 5 insertions, 4 deletions
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)
diff --git a/t/t7508-status.sh b/t/t7508-status.sh
index 9bc9817f28..d4844abf13 100755
--- a/t/t7508-status.sh
+++ b/t/t7508-status.sh
@@ -364,7 +364,7 @@ test_expect_success 'status submodule summary (clean submodule)' '
test_cmp expect output
'
-test_expect_failure 'status -z implies porcelain' '
+test_expect_success 'status -z implies porcelain' '
git status --porcelain |
perl -pe "s/\012/\000/g" >expect &&
git status -z >output &&