From a5985237878481af5fbca349d0d1ad7d6b2d2bcb Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 7 May 2012 17:02:18 -0400 Subject: status: fix null termination with "-b" When the "-z" option is given to status, we are supposed to NUL-terminate each record. However, the "-b" code to show the tracking branch did not respect this, and always ended with a newline. Signed-off-by: Jeff King --- t/t7508-status.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 't') diff --git a/t/t7508-status.sh b/t/t7508-status.sh index fc57b135c..24728facf 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.q && + mv expect.q expect && + git status -s -z -b >output && + nul_to_q output.q && + mv output.q output && + test_cmp expect output +' + test_expect_success 'setup dir3' ' mkdir dir3 && : >dir3/untracked1 && -- cgit v1.2.1