t2106: make test independent of the current main branch name

We do have this wonderful shortcut `git checkout -` to go back to the
previous branch, thanks to the reflog.

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 14:49:06 +00:00 committed by Junio C Hamano
parent a900999d7c
commit bce46b1adc

View File

@ -20,7 +20,7 @@ test_expect_success 'do not switch branches with dirty file' '
git checkout other &&
echo dirt >file &&
git update-index --assume-unchanged file &&
test_must_fail git checkout master
test_must_fail git checkout -
'
test_done