X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-parse-remote.sh;h=aea7b0e5497fb0727533ea750503193fe308374a;hb=a52e4ef877f693a69710145f56d867365a755f91;hp=5e75e15a7e57ce0783ec4a9731e0c65563fd1198;hpb=b12bbd5986e1fae4120d7a415c1271c0273cad7e;p=git.git diff --git a/git-parse-remote.sh b/git-parse-remote.sh index 5e75e15a..aea7b0e5 100755 --- a/git-parse-remote.sh +++ b/git-parse-remote.sh @@ -94,6 +94,12 @@ canon_refs_list_for_fetch () { heads/* | tags/* ) local="refs/$local" ;; *) local="refs/heads/$local" ;; esac + + if local_ref_name=$(expr "$local" : 'refs/\(.*\)') + then + git-check-ref-format "$local_ref_name" || + die "* refusing to create funny ref '$local_ref_name' locally" + fi echo "${dot_prefix}${force}${remote}:${local}" dot_prefix=. done