Properly handle git submodules when GIT_FIXED_WORKDIR is set

This commit is contained in:
Timothy Parys 2026-02-15 12:36:15 -05:00 committed by Igor
parent 185f7978bf
commit aaad48ef6b

View File

@ -296,7 +296,12 @@ function fetch_from_repo() {
display_alert "Updating submodule" "${name} - ${surl} - ${sref}" "git"
git_ensure_safe_directory "$workdir/$path"
fetch_from_repo "$surl" "$workdir/$path" "$sref"
if [[ "${GIT_FIXED_WORKDIR}" != "" ]]; then
GIT_FIXED_WORKDIR="${GIT_FIXED_WORKDIR}/${path}" fetch_from_repo "$surl" "$workdir/$path" "$sref"
else
fetch_from_repo "$surl" "$workdir/$path" "$sref"
fi
done < <(git config -f .gitmodules --get-regexp 'submodule\..*\.path')
fi