summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xproject.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/project.py b/project.py
index 03a75f49..a20b4134 100755
--- a/project.py
+++ b/project.py
@@ -2186,12 +2186,15 @@ class Project(object):
2186 cmd.append('--update-head-ok') 2186 cmd.append('--update-head-ok')
2187 cmd.append(name) 2187 cmd.append(name)
2188 2188
2189 spec = []
2190
2189 # If using depth then we should not get all the tags since they may 2191 # If using depth then we should not get all the tags since they may
2190 # be outside of the depth. 2192 # be outside of the depth.
2191 if no_tags or depth: 2193 if no_tags or depth:
2192 cmd.append('--no-tags') 2194 cmd.append('--no-tags')
2193 else: 2195 else:
2194 cmd.append('--tags') 2196 cmd.append('--tags')
2197 spec.append(str((u'+refs/tags/*:') + remote.ToLocal('refs/tags/*')))
2195 2198
2196 if force_sync: 2199 if force_sync:
2197 cmd.append('--force') 2200 cmd.append('--force')
@@ -2202,12 +2205,9 @@ class Project(object):
2202 if submodules: 2205 if submodules:
2203 cmd.append('--recurse-submodules=on-demand') 2206 cmd.append('--recurse-submodules=on-demand')
2204 2207
2205 spec = []
2206 if not current_branch_only: 2208 if not current_branch_only:
2207 # Fetch whole repo 2209 # Fetch whole repo
2208 spec.append(str((u'+refs/heads/*:') + remote.ToLocal('refs/heads/*'))) 2210 spec.append(str((u'+refs/heads/*:') + remote.ToLocal('refs/heads/*')))
2209 if not (no_tags or depth):
2210 spec.append(str((u'+refs/tags/*:') + remote.ToLocal('refs/tags/*')))
2211 elif tag_name is not None: 2211 elif tag_name is not None:
2212 spec.append('tag') 2212 spec.append('tag')
2213 spec.append(tag_name) 2213 spec.append(tag_name)