From 25e9eb58d96dede6eb3c75346cbc168beb3184dc Mon Sep 17 00:00:00 2001 From: Janik von Rotz Date: Thu, 11 Sep 2025 15:51:30 +0200 Subject: [PATCH] feat(task): simplify shallow clone detection in git folder management functions --- task | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/task b/task index 5d45ee27..92f01a9b 100755 --- a/task +++ b/task @@ -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."