diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/t4027-diff-submodule.sh | 12 | ||||
-rwxr-xr-x | t/t7508-status.sh | 6 |
2 files changed, 14 insertions, 4 deletions
diff --git a/t/t4027-diff-submodule.sh b/t/t4027-diff-submodule.sh index 518bf9524e..bd84ea7c7f 100755 --- a/t/t4027-diff-submodule.sh +++ b/t/t4027-diff-submodule.sh @@ -258,7 +258,9 @@ test_expect_success 'git diff between submodule commits' ' expect_from_to >expect.body $subtip $subprev && test_cmp expect.body actual.body && git diff --ignore-submodules HEAD^..HEAD >actual && - ! test -s actual + sed -e "1,/^@@/d" actual >actual.body && + expect_from_to >expect.body $subtip $subprev && + test_cmp expect.body actual.body ' test_expect_success 'git diff between submodule commits [.git/config]' ' @@ -274,7 +276,9 @@ test_expect_success 'git diff between submodule commits [.git/config]' ' test_cmp expect.body actual.body && git config submodule.subname.ignore all && git diff HEAD^..HEAD >actual && - ! test -s actual && + sed -e "1,/^@@/d" actual >actual.body && + expect_from_to >expect.body $subtip $subprev && + test_cmp expect.body actual.body && git diff --ignore-submodules=dirty HEAD^..HEAD >actual && sed -e "1,/^@@/d" actual >actual.body && expect_from_to >expect.body $subtip $subprev && @@ -294,7 +298,9 @@ test_expect_success 'git diff between submodule commits [.gitmodules]' ' test_cmp expect.body actual.body && git config -f .gitmodules submodule.subname.ignore all && git diff HEAD^..HEAD >actual && - ! test -s actual && + sed -e "1,/^@@/d" actual >actual.body && + expect_from_to >expect.body $subtip $subprev && + test_cmp expect.body actual.body && git config submodule.subname.ignore dirty && git config submodule.subname.path sub && git diff HEAD^..HEAD >actual && diff --git a/t/t7508-status.sh b/t/t7508-status.sh index c987b5ed65..977295f786 100755 --- a/t/t7508-status.sh +++ b/t/t7508-status.sh @@ -1357,6 +1357,11 @@ test_expect_success "status (core.commentchar with two chars with submodule summ test_expect_success "--ignore-submodules=all suppresses submodule summary" ' cat > expect << EOF && On branch master +Changes to be committed: + (use "git reset HEAD <file>..." to unstage) + + modified: sm + Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) @@ -1374,7 +1379,6 @@ Untracked files: output untracked -no changes added to commit (use "git add" and/or "git commit -a") EOF git status --ignore-submodules=all > output && test_i18ncmp expect output |