summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-06-27 21:38:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-06-27 21:38:02 (GMT)
commit872f5bfb08b16057fdc02bb758abedcc6e4379ca (patch)
treeaf635cee878b432f8d614cb0140d174e2d729034 /t
parenta0bf40ddc94d8ec57c2422b29ba82f3450211300 (diff)
parent84cf246670eab56a23ed5554ed084053a0f19f2d (diff)
downloadgit-872f5bfb08b16057fdc02bb758abedcc6e4379ca.zip
git-872f5bfb08b16057fdc02bb758abedcc6e4379ca.tar.gz
git-872f5bfb08b16057fdc02bb758abedcc6e4379ca.tar.bz2
Merge branch 'jc/strbuf-branchname-fix' into maint
* jc/strbuf-branchname-fix: strbuf_branchname(): do not double-expand @{-1}~22
Diffstat (limited to 't')
-rwxr-xr-xt/t0100-previous.sh15
1 files changed, 13 insertions, 2 deletions
diff --git a/t/t0100-previous.sh b/t/t0100-previous.sh
index 315b9b3..e0a6940 100755
--- a/t/t0100-previous.sh
+++ b/t/t0100-previous.sh
@@ -27,6 +27,7 @@ test_expect_success 'merge @{-1}' '
test_commit B &&
git checkout A &&
test_commit C &&
+ test_commit D &&
git branch -f master B &&
git branch -f other &&
git checkout other &&
@@ -35,14 +36,24 @@ test_expect_success 'merge @{-1}' '
git cat-file commit HEAD | grep "Merge branch '\''other'\''"
'
-test_expect_success 'merge @{-1} when there is not enough switches yet' '
+test_expect_success 'merge @{-1}~1' '
+ git checkout master &&
+ git reset --hard B &&
+ git checkout other &&
+ git checkout master &&
+ git merge @{-1}~1 &&
+ git cat-file commit HEAD >actual &&
+ grep "Merge branch '\''other'\''" actual
+'
+
+test_expect_success 'merge @{-100} before checking out that many branches yet' '
git reflog expire --expire=now &&
git checkout -f master &&
git reset --hard B &&
git branch -f other C &&
git checkout other &&
git checkout master &&
- test_must_fail git merge @{-12}
+ test_must_fail git merge @{-100}
'
test_done