Skip to content

Commit

Permalink
Have init script clone submodules unconditionally
Browse files Browse the repository at this point in the history
Since 7110bf8 (in gitpython-developers#1693), "git submodule update --init --recursive"
was not run on CI, on the mistaken grounds that the CI test
workflows would already have taken care of cloning all submodules
(ever since 4eef3ec when the "submodules: recursive" option was
added to the actions/checkout step).

This changes the init-tests-after-clone.sh script to again run that
command unconditionally, including on CI. The assumption that it
wasn't needed on CI was based on the specific content of
GitPython's own GitHub Actions workflows. But this disregarded that
the test suite is run on CI for *other* projects: specifically, for
downstream projects that package GitPython.
  • Loading branch information
EliahKagan committed Oct 18, 2023
1 parent 61a2f0c commit 6adb4a3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions init-tests-after-clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,8 @@ git reset --hard HEAD~1
# Point the master branch where we started, so we test the correct code.
git reset --hard __testing_point__

# The tests need submodules. (On CI, they would already have been checked out.)
if ! ci; then
git submodule update --init --recursive
fi
# The tests need submodules, including a submodule with a submodule.
git submodule update --init --recursive

# The tests need some version tags. Try to get them even in forks. This fetches
# other objects too. So, locally, we always do it, for a consistent experience.
Expand Down

0 comments on commit 6adb4a3

Please sign in to comment.