X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-parse-remote.sh;h=aea7b0e5497fb0727533ea750503193fe308374a;hb=e3e291fc07b49b74bb655ca854bdb19e849e044c;hp=5e75e15a7e57ce0783ec4a9731e0c65563fd1198;hpb=d5b0c9ea178dab3599674ccff50645c0464b8c31;p=git.git diff --git a/git-parse-remote.sh b/git-parse-remote.sh index 5e75e15a7..aea7b0e54 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