From 17d85dac6fc41863672e5364d4aab1fec611625b Mon Sep 17 00:00:00 2001 From: markspanbroek Date: Wed, 7 Jun 2023 12:36:06 +0200 Subject: [PATCH] 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 --- scripts/build_nim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_nim.sh b/scripts/build_nim.sh index 8309d37..ffa40d3 100755 --- a/scripts/build_nim.sh +++ b/scripts/build_nim.sh @@ -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.