Merge branch 'ur/svn-local-zone'
[gitweb.git] / t / t1514-rev-parse-push.sh
index 7214f5b33fa41fbb685e572ca24a0cb11337d251..788cc91e452ce02af1c068b8c7b0bb1aa88ae395 100755 (executable)
@@ -24,12 +24,16 @@ test_expect_success 'setup' '
 
 test_expect_success '@{push} with default=nothing' '
        test_config push.default nothing &&
-       test_must_fail git rev-parse master@{push}
+       test_must_fail git rev-parse master@{push} &&
+       test_must_fail git rev-parse master@{PUSH} &&
+       test_must_fail git rev-parse master@{PuSH}
 '
 
 test_expect_success '@{push} with default=simple' '
        test_config push.default simple &&
-       resolve master@{push} refs/remotes/origin/master
+       resolve master@{push} refs/remotes/origin/master &&
+       resolve master@{PUSH} refs/remotes/origin/master &&
+       resolve master@{pUSh} refs/remotes/origin/master
 '
 
 test_expect_success 'triangular @{push} fails with default=simple' '
@@ -60,4 +64,10 @@ test_expect_success '@{push} with push refspecs' '
        resolve topic@{push} refs/remotes/origin/magic/topic
 '
 
+test_expect_success 'resolving @{push} fails with a detached HEAD' '
+       git checkout HEAD^0 &&
+       test_when_finished "git checkout -" &&
+       test_must_fail git rev-parse @{push}
+'
+
 test_done