This version is supposed to
> Fetch all history for all tags and branches when fetch-depth=0
We leave the tags fetch in place so that actions _in cloned repos_
work. Cloned repos' tags do not necessarily match adafruit/circuitpython,
but we want version reporting to be able to use adafruit/circuitpython
tags when they are most relevant according to "git describe"'s heuristics.
Submodules are different, as they always point to the repo specified
in .gitmodules, so they don't need special handling to get the most
relevant tags.
In order to get tags, including in submodules, we use our own fetching
procedure on top of checkout@v2.
A problem occuring in about 1% of jobs was that some submodules inexplicably
did not have an "origin" remote configured. "git submodule sync"
configures the "origin" remote in those cases. No cause for the problem
was determined.
Besides keeping up to date on actions/checkout, @v2 is supposed to fix a bug
where "re-run" of a pull request would fail checking out the code.