This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Description
This issue is to discuss what git commands should be executed by default when checking out a PR.
At the moment when we checkout a PR, we don't update any submodules that might be in the repo.
Issues with the current situation
- If the SHA of a contained submodule has changed the user won't be able to checkout another PR.
- If any user files are created in a submodule that aren't in
.gitignore the user won't be able to checkout another PR (this happens a lot with NCrunch).
What commands might we want to run
- git submodule update
- git submodule init
- git submodule sync
- git clean (in each submodule)
git submodule update
This would fix the most common issue when checking out a PR where there have been commits to a contained submodule.
git submodule init
If a submodule has been added?
git submodule sync
If a submodule has been moved?
git clean (in each submodule)
If NCrunch or a build has left user config or build artifacts in a submodule.
git checkout
Maybe we should allow the user to ignore untracked files (if git clean was deemed too dangerous).
(this has been implemented in #1302)
Hopefully the resident Git gurus will chime in with pros/cons and other ideas! 😄
See also #826