Skip to content

Commit 95b9f9f

Browse files
drafnelgitster
authored andcommitted
t7508: demonstrate status's failure to use --porcelain format with -z
When 'git status' is supplied the -z switch, and no output format has been selected, it is supposed to use the --porcelain format. This does not happen. Instead, the standard long format is used. Add a test to demonstrate this failure. Signed-off-by: Brandon Casey <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7c9f703 commit 95b9f9f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

t/t7508-status.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,13 @@ test_expect_success 'status submodule summary (clean submodule)' '
364364
test_cmp expect output
365365
'
366366

367+
test_expect_failure 'status -z implies porcelain' '
368+
git status --porcelain |
369+
perl -pe "s/\012/\000/g" >expect &&
370+
git status -z >output &&
371+
test_cmp expect output
372+
'
373+
367374
cat >expect <<EOF
368375
# On branch master
369376
# Changes to be committed:

0 commit comments

Comments
 (0)