diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-05-24 17:32:30 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-05-24 17:32:30 -0700 |
commit | a8bd582d3079e506c525fe1b735d6ea405576bff (patch) | |
tree | 64d36608aba9820111b3a4aa853c43d280547822 /t | |
parent | osxkeychain: pull make config from top-level directory (diff) | |
parent | status: respect "-b" for porcelain format (diff) | |
download | tgif-a8bd582d3079e506c525fe1b735d6ea405576bff.tar.xz |
Merge branch 'jk/maint-status-porcelain-z-b' into maint
"git status --porcelain" ignored "--branch" option by mistake. The output
for "git status --branch -z" was also incorrect and did not terminate the
record for the current branch name with NUL as asked.
By Jeff King
* jk/maint-status-porcelain-z-b:
status: respect "-b" for porcelain format
status: fix null termination with "-b"
status: refactor null_termination option
commit: refactor option parsing
Diffstat (limited to 't')
-rwxr-xr-x | t/t7508-status.sh | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/t/t7508-status.sh b/t/t7508-status.sh index fc57b135c5..5d0e79fe2a 100755 --- a/t/t7508-status.sh +++ b/t/t7508-status.sh @@ -271,6 +271,15 @@ test_expect_success 'status -s -b' ' ' +test_expect_success 'status -s -z -b' ' + tr "\\n" Q <expect >expect.q && + mv expect.q expect && + git status -s -z -b >output && + nul_to_q <output >output.q && + mv output.q output && + test_cmp expect output +' + test_expect_success 'setup dir3' ' mkdir dir3 && : >dir3/untracked1 && @@ -647,9 +656,14 @@ test_expect_success 'status --porcelain ignores color.status' ' git config --unset color.status git config --unset color.ui -test_expect_success 'status --porcelain ignores -b' ' +test_expect_success 'status --porcelain respects -b' ' git status --porcelain -b >output && + { + echo "## master" && + cat expect + } >tmp && + mv tmp expect && test_cmp expect output ' |