refactor fetch's ref matching to use refname_match()
[gitweb.git] / t / t5510-fetch.sh
index aad863db7ad74ed217b3bcc76de43556f9fe7a07..20257428eb0a98f639e7d373f1d00ad91d7c16ad 100755 (executable)
@@ -95,6 +95,31 @@ test_expect_success 'fetch following tags' '
 
 '
 
+test_expect_failure 'fetch must not resolve short tag name' '
+
+       cd "$D" &&
+
+       mkdir five &&
+       cd five &&
+       git init &&
+
+       git fetch .. anno:five
+
+'
+
+test_expect_failure 'fetch must not resolve short remote name' '
+
+       cd "$D" &&
+       git-update-ref refs/remotes/six/HEAD HEAD
+
+       mkdir six &&
+       cd six &&
+       git init &&
+
+       git fetch .. six:six
+
+'
+
 test_expect_success 'create bundle 1' '
        cd "$D" &&
        echo >file updated again by origin &&