summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--remote.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/remote.c b/remote.c
index 500ca4d968..cf98a44367 100644
--- 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;