diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-11-15 10:22:54 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-11-15 10:22:54 -0800 |
commit | 7115d3cc2b06364645dbfbbb0b8b7d49315566e2 (patch) | |
tree | 89ce02657e1db8a5d96f75e8f3087b7a0f079e1c /remote.c | |
parent | b0b00a3ee43b4813eb85728a482500f6422499fd (diff) | |
parent | 5c08c1f23ad512fbcd06f4ee9bcf8818e17a2627 (diff) | |
download | git-7115d3cc2b06364645dbfbbb0b8b7d49315566e2.tar.gz |
Merge branch 'jc/maint-fetch-tighten-refname-check'
For a fetch refspec (or the result of applying wildcard on one), we
always want the RHS to map to something inside "refs/" hierarchy.
This was split out from discarded jc/maint-push-refs-all topic.
* jc/maint-fetch-tighten-refname-check:
get_fetch_map(): tighten checks on dest refs
Diffstat (limited to 'remote.c')
-rw-r--r-- | remote.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1458,8 +1458,8 @@ int get_fetch_map(const struct ref *remote_refs, for (rmp = &ref_map; *rmp; ) { if ((*rmp)->peer_ref) { - if (check_refname_format((*rmp)->peer_ref->name + 5, - REFNAME_ALLOW_ONELEVEL)) { + if (prefixcmp((*rmp)->peer_ref->name, "refs/") || + check_refname_format((*rmp)->peer_ref->name, 0)) { struct ref *ignore = *rmp; error("* Ignoring funny ref '%s' locally", (*rmp)->peer_ref->name); |