1# tested so far with: 2# - no revision specified and remote has a HEAD which is used 3# - revision specified and remote has a HEAD 4# - revision specified and remote without HEAD 5# 6 7echo "exporting $url (rev $rev) into $out" 8 9runHook preFetch 10 11if [ -n "$gitConfigFile" ]; then 12 echo "using GIT_CONFIG_GLOBAL=$gitConfigFile" 13 export GIT_CONFIG_GLOBAL="$gitConfigFile" 14fi 15 16$SHELL $fetcher --builder --url "$url" --out "$out" --rev "$rev" --name "$name" \ 17 ${leaveDotGit:+--leave-dotGit} \ 18 ${fetchLFS:+--fetch-lfs} \ 19 ${deepClone:+--deepClone} \ 20 ${fetchSubmodules:+--fetch-submodules} \ 21 ${fetchTags:+--fetch-tags} \ 22 ${sparseCheckout:+--sparse-checkout "$sparseCheckout"} \ 23 ${nonConeMode:+--non-cone-mode} \ 24 ${branchName:+--branch-name "$branchName"} \ 25 ${rootDir:+--root-dir "$rootDir"} 26 27runHook postFetch