sha1-file.c: mark more strings for translation
[gitweb.git] / t / t3204-branch-name-interpretation.sh
index e671a7a6442ad3353ddfff6338891f0a2022bece..698d9cc4f3d65754552b8ccdd46b0cb64aea09c5 100755 (executable)
@@ -42,7 +42,7 @@ test_expect_success 'update branch via local @{upstream}' '
        expect_branch local two
 '
 
-test_expect_failure 'disallow updating branch via remote @{upstream}' '
+test_expect_success 'disallow updating branch via remote @{upstream}' '
        git update-ref refs/remotes/origin/remote one &&
        git branch --set-upstream-to=origin/remote &&
 
@@ -83,7 +83,7 @@ test_expect_success 'delete branch via remote @{upstream}' '
 # Note that we create two oddly named local branches here. We want to make
 # sure that we do not accidentally delete either of them, even if
 # shorten_unambiguous_ref() tweaks the name to avoid ambiguity.
-test_expect_failure 'delete @{upstream} expansion matches -r option' '
+test_expect_success 'delete @{upstream} expansion matches -r option' '
        git update-ref refs/remotes/origin/remote-del two &&
        git branch --set-upstream-to=origin/remote-del &&
        git update-ref refs/heads/origin/remote-del two &&
@@ -94,7 +94,7 @@ test_expect_failure 'delete @{upstream} expansion matches -r option' '
        expect_branch refs/heads/remotes/origin/remote-del two
 '
 
-test_expect_failure 'disallow deleting remote branch via @{-1}' '
+test_expect_success 'disallow deleting remote branch via @{-1}' '
        git update-ref refs/remotes/origin/previous one &&
 
        git checkout -b origin/previous two &&
@@ -109,15 +109,25 @@ test_expect_failure 'disallow deleting remote branch via @{-1}' '
 # and not refs/heads/HEAD. These tests should not imply that refs/heads/@ is a
 # sane thing, but it _is_ technically allowed for now. If we disallow it, these
 # can be switched to test_must_fail.
-test_expect_failure 'create branch named "@"' '
+test_expect_success 'create branch named "@"' '
        git branch -f @ one &&
        expect_branch refs/heads/@ one
 '
 
-test_expect_failure 'delete branch named "@"' '
+test_expect_success 'delete branch named "@"' '
        git update-ref refs/heads/@ two &&
        git branch -D @ &&
        expect_deleted refs/heads/@
 '
 
+test_expect_success 'checkout does not treat remote @{upstream} as a branch' '
+       git update-ref refs/remotes/origin/checkout one &&
+       git branch --set-upstream-to=origin/checkout &&
+       git update-ref refs/heads/origin/checkout two &&
+       git update-ref refs/heads/remotes/origin/checkout two &&
+
+       git checkout @{upstream} &&
+       expect_branch HEAD one
+'
+
 test_done