X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=t%2Ft2060-switch.sh;h=2c1b8c0d6d22469fadd9eeb05a19c1b7a53d0f51;hb=06f1b8df6f3f90746c8ed50296e467e540531d8f;hp=f9efa29dfb8c7ad762fc502d883db2aaa3f114a2;hpb=f76897b6ce9964a25f4c85f9fb034cba9dd71573;p=platform%2Fupstream%2Fgit.git diff --git a/t/t2060-switch.sh b/t/t2060-switch.sh index f9efa29..2c1b8c0 100755 --- a/t/t2060-switch.sh +++ b/t/t2060-switch.sh @@ -68,6 +68,14 @@ test_expect_success 'new orphan branch from empty' ' test_cmp expected tracked-files ' +test_expect_success 'orphan branch works with --discard-changes' ' + test_when_finished git switch master && + echo foo >foo.txt && + git switch --discard-changes --orphan new-orphan2 && + git ls-files >tracked-files && + test_must_be_empty tracked-files +' + test_expect_success 'switching ignores file of same branch name' ' test_when_finished git switch master && : >first-branch &&