Fix checking out of recent Nim tags in shallow repo (#58)

* Fix checking out of recent Nim tags in shallow repo

When calling `git fetch` on a shallow repo, recent
tags or commits are refused. Fetching with `--tags`
ensures that the latest tags and the commits that
they point to are fetched.

More info:
https://git-scm.com/docs/git-fetch#Documentation/git-fetch.txt---update-shallow

Co-authored-by: Tanguy <tanguy@status.im>
This commit is contained in:
markspanbroek 2023-06-07 12:36:06 +02:00 committed by GitHub
parent cb65dbcd80
commit 17d85dac6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ nim_needs_rebuilding() {
# Pay the price for a non-default NIM_COMMIT here, by fetching everything.
# (This includes upstream branches and tags that might be missing from our fork.)
git remote add upstream https://github.com/nim-lang/Nim
git fetch --all
git fetch --all --tags --quiet
git checkout -q ${NIM_COMMIT}
fi
# In case the local branch diverged and a fast-forward merge is not possible.