You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This makes three related changes:
- Removes "git fetch --tags" from the instructions in the readme,
because the goal of this command can be achieved in the
init-tests-after-clone.sh script, and because this fetch command,
as written, is probably only achieving that goal in narrow cases.
In clones and fetches, tags on branches are fetched by default,
and the tags needed by the tests are on branches. So the
situations where "git fetch --tags" was helping were (a) when the
remote recently gained the tags, and (b) when the original remote
was cloned in an unusual way, not fetching all tags. In both
cases, the "--tags" option is not what makes that fetch get the
needed tags.
- Adds "git fetch --all --tags" to init-tests-after-clone.sh. The
"--all" option causes it to fetch from all remotes, and this is
more significant than "--tags", since the tags needed for testing
are on fetched branches. This achieves what "git fetch --tags"
was achieving, and it also has the benefit of getting tags from
remotes that have been added but not fetched from, as happens
with an upstream remote that was manually added with no further
action. (It also gets branches from those remotes, but if master
is on multiple remotes but at different commits then "git
checkout master" may not be able to pick one. So do this *after*
rather than before that.)
- Skips this extra fetch, and also the submodule cloning/updating
step, when running on CI. CI jobs will already have taken care of
cloning the repo with submodules recursively, and fetching all
available tags. In forks without tags, the necessary tags for the
test are not fetched--but the upstream remote is not set up on
CI, so they wouldn't be obtained anyway, not even by refetching
with "--all".
0 commit comments