Skip to content

Commit

Permalink
Merge pull request #200 from devnoname120/fix-bundle-submodule-update
Browse files Browse the repository at this point in the history
Fix bundle submodules not updating
  • Loading branch information
mattmc3 authored Nov 20, 2024
2 parents 4858ab3 + 04b6690 commit 64b7864
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions functions/antidote-update
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
() {
local oldsha=$(git -C "$1" rev-parse --short HEAD)
git -C "$1" pull --quiet --ff --rebase --autostash
git -C "$1" submodule --quiet update --init --recursive --depth 1
local newsha=$(git -C "$1" rev-parse --short HEAD)
if [[ $oldsha != $newsha ]]; then
print "${green}antidote: updated: $2 ${oldsha} -> ${newsha}${normal}"
Expand Down
7 changes: 6 additions & 1 deletion tests/functions/mockgit
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
local args=("$@[@]")
local o_path o_quiet o_ff o_rebase o_autostash o_short
local o_depth o_recurse_submodules o_shallow_submodules o_branch
local o_init o_recursive
zparseopts -D -E -- \
C:=o_path \
-short=o_short \
Expand All @@ -23,7 +24,9 @@
-recurse-submodules=o_recurse_submodules \
-shallow-submodules=o_shallow_submodules \
-depth:=o_depth \
-branch:=o_branch ||
-branch:=o_branch \
-init:=o_init \
-recursive:=o_recursive ||
return 1

if [[ "$@" = "--version" ]]; then
Expand Down Expand Up @@ -56,6 +59,8 @@
elif [[ "$@" = "rev-parse HEAD" ]]; then
#echo "a123456"
echo ""
elif [[ "$@" = "submodule update" ]]; then
# nothing to do
else
echo >&2 "mocking not implemented for git command: git $@"
return 1
Expand Down

0 comments on commit 64b7864

Please sign in to comment.