promisor-remote: use repository_format_partial_clone
[gitweb.git] / ls-refs.c
index 9c9a7c647f26249d68319786449eefd7d6de1eba..818aef70a09e7cedc2f241f235302e69969b2e3b 100644 (file)
--- a/ls-refs.c
+++ b/ls-refs.c
@@ -44,7 +44,7 @@ static int send_ref(const char *refname, const struct object_id *oid,
        if (ref_is_hidden(refname_nons, refname))
                return 0;
 
-       if (!ref_match(&data->prefixes, refname))
+       if (!ref_match(&data->prefixes, refname_nons))
                return 0;
 
        strbuf_addf(&refline, "%s %s", oid_to_hex(oid), refname_nons);
@@ -57,7 +57,8 @@ static int send_ref(const char *refname, const struct object_id *oid,
                if (!symref_target)
                        die("'%s' is a symref but it is not?", refname);
 
-               strbuf_addf(&refline, " symref-target:%s", symref_target);
+               strbuf_addf(&refline, " symref-target:%s",
+                           strip_namespace(symref_target));
        }
 
        if (data->peel) {