Skip to content

Commit

Permalink
t7508: demonstrate status's failure to use --porcelain format with -z
Browse files Browse the repository at this point in the history
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 <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Brandon Casey authored and Junio C Hamano committed May 29, 2011
1 parent 7c9f703 commit 95b9f9f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions t/t7508-status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,13 @@ test_expect_success 'status submodule summary (clean submodule)' '
test_cmp expect output
'

test_expect_failure 'status -z implies porcelain' '
git status --porcelain |
perl -pe "s/\012/\000/g" >expect &&
git status -z >output &&
test_cmp expect output
'

cat >expect <<EOF
# On branch master
# Changes to be committed:
Expand Down

0 comments on commit 95b9f9f

Please sign in to comment.