diff --git a/t/t7201-co.sh b/t/t7201-co.sh
index fbec70d3c6abff4a97aa205aa10fbf6fe336fa5f..0679abd29d907944c5c246275adfcd760f001d55 100755 (executable)
--- a/t/t7201-co.sh
+++ b/t/t7201-co.sh
test_cmp sample file
'
test_cmp sample file
'
+test_expect_success 'failing checkout -b should not break working tree' '
+ git reset --hard master &&
+ git symbolic-ref HEAD refs/heads/master &&
+ test_must_fail git checkout -b renamer side^ &&
+ test $(git symbolic-ref HEAD) = refs/heads/master &&
+ git diff --exit-code &&
+ git diff --cached --exit-code
+
+'
+
test_done
test_done