mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-01-02 16:14:25 +00:00
Explicitly allow clobbering tags when fetching from remote.
Bug: b/139860049 Change-Id: I3c4134eda7e9e75c9d72b233e269bcc0e624d1e8 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/234632 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Xin Li <delphij@google.com>
This commit is contained in:
parent
d5c306b404
commit
3069be2684
@ -2201,6 +2201,8 @@ class Project(object):
|
|||||||
if not current_branch_only:
|
if not current_branch_only:
|
||||||
# Fetch whole repo
|
# Fetch whole repo
|
||||||
spec.append(str((u'+refs/heads/*:') + remote.ToLocal('refs/heads/*')))
|
spec.append(str((u'+refs/heads/*:') + remote.ToLocal('refs/heads/*')))
|
||||||
|
if not (no_tags or depth):
|
||||||
|
spec.append(str((u'+refs/tags/*:') + remote.ToLocal('refs/tags/*')))
|
||||||
elif tag_name is not None:
|
elif tag_name is not None:
|
||||||
spec.append('tag')
|
spec.append('tag')
|
||||||
spec.append(tag_name)
|
spec.append(tag_name)
|
||||||
|
Loading…
Reference in New Issue
Block a user