ls-refs: filter refs using namespace-stripped name
[gitweb.git] / ls-refs.c
index a06f12eca8d6f9816c481f1f445791388d53039c..7782bb054b09ff34dc4784185d3eeff6de9c4621 100644 (file)
--- a/ls-refs.c
+++ b/ls-refs.c
@@ -40,7 +40,7 @@ static int send_ref(const char *refname, const struct object_id *oid,
        const char *refname_nons = strip_namespace(refname);
        struct strbuf refline = STRBUF_INIT;
 
-       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);