Skip to content

Commit fa09f27

Browse files
committed
Do not init submodules
1 parent efb2f78 commit fa09f27

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/update-subtree.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ jobs:
111111
fi
112112
113113
git checkout ${NEXT_COMMIT_HASH}
114-
git submodule update --init -- library/
115-
git submodule status -- library/ > ../submodule-heads
114+
# Collect submodule commits; note that submodules (intentionally!)
115+
# aren't initialized, hence lines will be prefixed with "-" (see git
116+
# submodule --help).
117+
git submodule status -- library/ | sed 's/^-//' > ../submodule-heads
116118
/usr/bin/time -v ../splitsh-lite/splitsh-lite --progress --prefix=library --target subtree/library
117119
git checkout -b subtree/library subtree/library
118120
@@ -191,7 +193,7 @@ jobs:
191193
echo "NEW_SUBTREE_HEAD=${NEW_SUBTREE_HEAD}" >> $GITHUB_ENV
192194
193195
git submodule foreach 'git fetch'
194-
git submodule foreach 'git fetch; grep $sm_path $toplevel/../submodule-heads | cut -f2 -d" " | xargs git checkout'
196+
git submodule foreach 'git fetch; grep $sm_path $toplevel/../submodule-heads | cut -f1 -d" " | xargs git checkout'
195197
git -c user.name=gitbot -c user.email=git@bot \
196198
commit -m "Update submodules" library/
197199

0 commit comments

Comments
 (0)