filter-branch documentation: some more touch-ups.
[gitweb.git] / remote.c
index 500ca4d968753485ac38d44e238e93ab86372c1c..cf98a44367cfad364871af4f1e191a9e7412562d 100644 (file)
--- a/remote.c
+++ b/remote.c
@@ -544,6 +544,13 @@ int match_refs(struct ref *src, struct ref *dst, struct ref ***dst_tail,
                        if (!pat)
                                continue;
                }
+               else if (prefixcmp(src->name, "refs/heads/"))
+                       /*
+                        * "matching refs"; traditionally we pushed everything
+                        * including refs outside refs/heads/ hierarchy, but
+                        * that does not make much sense these days.
+                        */
+                       continue;
 
                if (pat) {
                        const char *dst_side = pat->dst ? pat->dst : pat->src;