feat(task): simplify shallow clone detection in git folder management functions

This commit is contained in:
Janik von Rotz committed 2025-09-11 15:51:30 +02:00
1 parent da249e044d
commit 25e9eb58d9
1 file changed
+2 -2
+2 -2
View File
@@ -2383,7 +2383,7 @@ function checkout-git-folder() {
GIT_FOLDERS=$(ls-git-folder)
for GIT_FOLDER in $GIT_FOLDERS; do
SHALLOW=$(git config --file .gitmodules --get-regexp submodule."$GIT_FOLDER".shallow | awk '{ print $2 }')
SHALLOW=$(git config --file .gitmodules --get submodule."$GIT_FOLDER".shallow)
COMMIT_REF=$(grep "$GIT_FOLDER" "versions/$ODOO_VERSION/.gitmodules.csv" | cut -d',' -f2)
if [ "$SHALLOW" = "true" ]; then
@@ -2408,7 +2408,7 @@ function switch-git-folder() {
GIT_FOLDERS=$(ls-git-folder)
for GIT_FOLDER in $GIT_FOLDERS; do
SHALLOW=$(git config --file .gitmodules --get-regexp submodule."$GIT_FOLDER".shallow | awk '{ print $2 }')
SHALLOW=$(git config --file .gitmodules --get submodule."$GIT_FOLDER".shallow)
if [ "$SHALLOW" = "true" ]; then
echo "Fetch branch $ODOO_VERSION (shallow) from origin and then switch."