From 768403a5cdb51fe3042f2890d54c3bd5014f1a15 Mon Sep 17 00:00:00 2001 From: Janik von Rotz Date: Tue, 18 Aug 2026 08:36:54 +0200 Subject: [PATCH] chore: add verbose logging to checkout-git-folder operations --- bin/checkout-git-folder | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/bin/checkout-git-folder b/bin/checkout-git-folder index b8685d3..f24b5ba 100755 --- a/bin/checkout-git-folder +++ b/bin/checkout-git-folder @@ -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() {