
9 Feb
2021
9 Feb
'21
3:47 p.m.
+# modify submodules address to local server address. +modify_gitmodules() { + [ "$DISABLE_SUBMODULES" == "true" ] || return + + if [[ -f ".gitmodules" ]] && [[ -n ${LKP_SERVER} ]]; then + echo -e "[url \"git://${LKP_SERVER}/\"]\n\tinsteadOf = https://" >> /etc/gitconfig + fi +} + extract_git() { local netfile=$1
@@ -623,10 +632,7 @@ extract_git() {
cd_safe "${dir##*/}"
- # modify submodules address to local server address. - if [[ -f ".gitmodules" ]] && [[ -n ${LKP_SERVER} ]]; then - echo -e "[url \"git://${LKP_SERVER}/\"]\n\tinsteadOf = https://" >> /etc/gitconfig - fi + modify_gitmodules
Better create a standalone patch for the above refactor. Thanks, Fengguang