support/download: force fetching tags
Our git download backend switches the remote of our local clone, and fetches all refs and tags from that remote. When the local clone has a tag fetched from another remote, and the new remote also has a tag by the same name, and that tag points to another commit, then git refuses to fetch the new tag and exits in error, as it considers that the new tag would clobber the existing one. This is safe and sane behaviour when run interactively with a human that can take a decision. However, in our case, we don't care about any tags that were present before, as only the last one makes sense in our case: the one from the remote the user has requested for the current build. Tell git to forcefully pull tags, even if they would clobber existing ones. Note that, although this changes the git backend, it does not change the content of generated archives, so we do not need to bump the suffix version. Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
This commit is contained in:
parent
bc71274a34
commit
72bcff3081
support/download
|
@ -132,7 +132,7 @@ _git remote set-url origin "'${uri}'"
|
|||
|
||||
printf "Fetching all references\n"
|
||||
_git fetch origin
|
||||
_git fetch origin -t
|
||||
_git fetch origin -t -f
|
||||
|
||||
# Try to get the special refs exposed by some forges (pull-requests for
|
||||
# github, changes for gerrit...). There is no easy way to know whether
|
||||
|
|
Loading…
Reference in New Issue