test: t4102-apply-rename fails with strict umask.
[gitweb.git] / git-parse-remote.sh
index 5e75e15a7e57ce0783ec4a9731e0c65563fd1198..aea7b0e5497fb0727533ea750503193fe308374a 100755 (executable)
@@ -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