summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-05-24 17:32:30 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-05-24 17:32:30 -0700
commita8bd582d3079e506c525fe1b735d6ea405576bff (patch)
tree64d36608aba9820111b3a4aa853c43d280547822 /t
parentosxkeychain: pull make config from top-level directory (diff)
parentstatus: respect "-b" for porcelain format (diff)
downloadtgif-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-xt/t7508-status.sh16
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
'