From f4609b896fac842433bd495c166d5987852a6a73 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 21 Nov 2020 19:20:35 +0100 Subject: merge(3p/git): Merge git subtree at v2.29.2 This also bumps the stable nixpkgs to 20.09 as of 2020-11-21, because there is some breakage in the git build related to the netrc credentials helper which someone has taken care of in nixpkgs. The stable channel is not used for anything other than git, so this should be fine. Change-Id: I3575a19dab09e1e9556cf8231d717de9890484fb --- third_party/git/t/t7508-status.sh | 45 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) (limited to 'third_party/git/t/t7508-status.sh') diff --git a/third_party/git/t/t7508-status.sh b/third_party/git/t/t7508-status.sh index 4e676cdce8d6..963fed682138 100755 --- a/third_party/git/t/t7508-status.sh +++ b/third_party/git/t/t7508-status.sh @@ -814,6 +814,33 @@ test_expect_success 'status -s without relative paths' ' ' +cat >expect <<\EOF + M dir1/modified +A dir2/added +A "file with spaces" +?? dir1/untracked +?? dir2/modified +?? dir2/untracked +?? "file with spaces 2" +?? untracked +EOF + +test_expect_success 'status -s without relative paths' ' + test_when_finished "git rm --cached \"file with spaces\"; rm -f file*" && + >"file with spaces" && + >"file with spaces 2" && + >"expect with spaces" && + git add "file with spaces" && + + git status -s >output && + test_cmp expect output && + + git status -s --ignored >output && + grep "^!! \"expect with spaces\"$" output && + grep -v "^!! " output >output-wo-ignored && + test_cmp expect output-wo-ignored +' + test_expect_success 'dry-run of partial commit excluding new file in index' ' cat >expect <expect <actual && + test_i18ngrep "HEAD detached at [0-9a-f]\\+" actual +' + test_expect_success 'setup status submodule summary' ' test_create_repo sm && ( cd sm && @@ -1471,7 +1510,7 @@ test_expect_success '"status.branch=true" same as "-b"' ' test_expect_success '"status.branch=true" different from "--no-branch"' ' git status -s --no-branch >expected_nobranch && git -c status.branch=true status -s >actual && - test_must_fail test_cmp expected_nobranch actual + ! test_cmp expected_nobranch actual ' test_expect_success '"status.branch=true" weaker than "--no-branch"' ' @@ -1571,7 +1610,7 @@ test_expect_success '"status.showStash=true" weaker than "--no-show-stash"' ' test_cmp expected_without_stash actual ' -test_expect_success 'no additionnal info if no stash entries' ' +test_expect_success 'no additional info if no stash entries' ' git stash clear && git -c status.showStash=true status >actual && test_cmp expected_without_stash actual -- cgit 1.4.1