chore: add verbose logging to checkout-git-folder operations

This commit is contained in:
Janik von Rotz committed 2026-08-18 08:36:54 +02:00
1 parent 06a27976c8
commit 768403a5cd
1 file changed
+7 -6
+7 -6
View File
@@ -23,16 +23,17 @@ checkout-git-folder() {
continue
fi
local shallow=$(git config --file .gitmodules --get submodule."$git_folder".shallow)
echo "Stash changes $git_folder"
git -C "$git_folder" stash >/dev/null 2>&1 || true
local shallow=$(git config --file .gitmodules --get submodule."$git_folder".shallow)
if [[ "$shallow" = "true" ]]; then
git -C "$git_folder" stash >/dev/null 2>&1 || true
echo "Fetch origin $git_branch:$git_branch for $git_folder"
git -C "$git_folder" fetch origin "$git_branch:$git_branch" >/dev/null 2>&1
git -C "$git_folder" checkout "$commit_ref" >/dev/null 2>&1
else
git -C "$git_folder" stash >/dev/null 2>&1 || true
git -C "$git_folder" checkout "$commit_ref" >/dev/null 2>&1
fi
echo "Checkout $commit_ref in $git_folder"
git -C "$git_folder" checkout "$commit_ref" >/dev/null 2>&1
done
}
cgf() {