Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2020-11-19 02:35:44 +0300
committerJunio C Hamano <gitster@pobox.com>2020-11-19 22:51:01 +0300
commit26d0a6d47ab946f49e2aee40ae16f53915c397f4 (patch)
treeaf889d65ed9befbb2daafddf95d0dff67c452c88 /t/t4015-diff-whitespace.sh
parent898f80736c75878acc02dc55672317fcc0e0a5a6 (diff)
t4015: let the test pass with any default branch name
We do not need to hard-code the actual branch name, as we can use the `test_commit` function to simplify the code and use the tag it generates, thereby being a lot more precise in what we want. Strangely enough, this test case would have succeeded even with an overridden default branch name, obviously for the wrong reason. Let's verify that it passes for the expected reason, by looking for a tell-tale in Git's output. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4015-diff-whitespace.sh')
-rwxr-xr-xt/t4015-diff-whitespace.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh
index 8bdaa0a693..47f0e2889d 100755
--- a/t/t4015-diff-whitespace.sh
+++ b/t/t4015-diff-whitespace.sh
@@ -877,13 +877,13 @@ test_expect_success 'rename empty' '
test_expect_success 'combined diff with autocrlf conversion' '
git reset --hard &&
- echo >x hello &&
- git commit -m "one side" x &&
+ test_commit "one side" x hello one-side &&
git checkout HEAD^ &&
echo >x goodbye &&
git commit -m "the other side" x &&
git config core.autocrlf true &&
- test_must_fail git merge master &&
+ test_must_fail git merge one-side >actual &&
+ test_i18ngrep "Automatic merge failed" actual &&
git diff >actual.raw &&
sed -e "1,/^@@@/d" actual.raw >actual &&