Skip to content

Commit aaad48e

Browse files
tparysigorpecovnik
authored andcommitted
Properly handle git submodules when GIT_FIXED_WORKDIR is set
1 parent 185f797 commit aaad48e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/functions/general/git.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,12 @@ function fetch_from_repo() {
296296

297297
display_alert "Updating submodule" "${name} - ${surl} - ${sref}" "git"
298298
git_ensure_safe_directory "$workdir/$path"
299-
fetch_from_repo "$surl" "$workdir/$path" "$sref"
299+
300+
if [[ "${GIT_FIXED_WORKDIR}" != "" ]]; then
301+
GIT_FIXED_WORKDIR="${GIT_FIXED_WORKDIR}/${path}" fetch_from_repo "$surl" "$workdir/$path" "$sref"
302+
else
303+
fetch_from_repo "$surl" "$workdir/$path" "$sref"
304+
fi
300305

301306
done < <(git config -f .gitmodules --get-regexp 'submodule\..*\.path')
302307
fi

0 commit comments

Comments
 (0)