X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-parse-remote.sh;h=aea7b0e5497fb0727533ea750503193fe308374a;hb=ad4f4daae80cb00000aca76e1528add6daf8f033;hp=4d8a572a9903179494c7cc4f8a72729a47f1c12b;hpb=0542f48c894f924d94a2bd05f7e4cbab25656112;p=git.git diff --git a/git-parse-remote.sh b/git-parse-remote.sh index 4d8a572a..aea7b0e5 100755 --- a/git-parse-remote.sh +++ b/git-parse-remote.sh @@ -1,6 +1,6 @@ #!/bin/sh -. git-sh-setup || die "Not a git archive" +. git-sh-setup get_data_source () { case "$1" in @@ -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