From 3069be2684b0301886c8212d589fe670569a896e Mon Sep 17 00:00:00 2001 From: Xin Li Date: Thu, 22 Aug 2019 10:00:27 -0700 Subject: [PATCH] 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 Tested-by: Xin Li --- project.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/project.py b/project.py index 428cab51..5a478b41 100755 --- a/project.py +++ b/project.py @@ -2201,6 +2201,8 @@ class Project(object): if not current_branch_only: # Fetch whole repo 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: spec.append('tag') spec.append(tag_name)