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:
parent
a900999d7c
commit
bce46b1adc
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user