chore: add verbose logging to checkout-git-folder operations
This commit is contained in:
1 file changed
+7
-6
@@ -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() {
|
||||
|
||||
Reference in new issue
Block a user