Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-10-18 19:18:11 +0400
committerJunio C Hamano <gitster@pobox.com>2008-10-18 19:18:11 +0400
commita38bb0cc0fc98bf868ad48dc11d229addcca586c (patch)
tree5bd66906929bdadf42cd10522b1e71f9dc864654 /t
parent3b1eb124932772daee09419a581d418ea2d50045 (diff)
parent352eadc40024b141e1295693654ec20cc123844f (diff)
Merge branch 'db/maint-checkout-b' into maint
* db/maint-checkout-b: Check early that a new branch is new and valid
Diffstat (limited to 't')
-rwxr-xr-xt/t7201-co.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t7201-co.sh b/t/t7201-co.sh
index fbec70d3c6..0679abd29d 100755
--- a/t/t7201-co.sh
+++ b/t/t7201-co.sh
@@ -359,4 +359,14 @@ test_expect_success 'checkout an unmerged path should fail' '
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