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>
This commit is contained in:
Johannes Schindelin 2020-11-18 23:35:44 +00:00 коммит произвёл Junio C Hamano
Родитель 898f80736c
Коммит 26d0a6d47a
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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 &&