get_fetch_map(): tighten checks on dest refs
commit5c08c1f23ad512fbcd06f4ee9bcf8818e17a2627
authorJunio C Hamano <gitster@pobox.com>
Fri, 4 May 2012 22:35:18 +0000 (4 15:35 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Oct 2012 23:12:45 +0000 (19 16:12 -0700)
tree2cce79d0dd82edab6e29dfe44da0fb2ad8cff921
parentd9f5ef7a4a760d58f1f824f9fb8c12ef0371d3a9
get_fetch_map(): tighten checks on dest refs

The code to check the refname we store the fetched result locally did not
bother checking the first 5 bytes of it, presumably assuming that it
always begin with "refs/".  For a fetch refspec (or the result of applying
wildcard on one), we always want the RHS to map to something inside
"refs/" hierarchy, so let's spell that rule out in a more explicit way.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote.c