ls-remote: do not send ref prefixes for patterns
[gitweb.git] / t / t5512-ls-remote.sh
index 6a949484d090ea2df02603f9d82bf4f203a799e9..94170b663fd8a7f40fb745b7d80f1947b258969d 100755 (executable)
@@ -304,4 +304,13 @@ test_expect_success 'ls-remote works outside repository' '
        nongit git ls-remote dst.git
 '
 
+test_expect_success 'ls-remote patterns work with all protocol versions' '
+       git for-each-ref --format="%(objectname)        %(refname)" \
+               refs/heads/master refs/remotes/origin/master >expect &&
+       git -c protocol.version=1 ls-remote . master >actual.v1 &&
+       test_cmp expect actual.v1 &&
+       git -c protocol.version=2 ls-remote . master >actual.v2 &&
+       test_cmp expect actual.v2
+'
+
 test_done