mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-23 07:16:21 +00:00
Repo should not fetch tags for shallow projects
Fetching all tags for a shallow git results in an inconstent git and forces git to fetch more than the depth specified. This change teaches repo not to fetch any tags in a repository initialised with the depth option. Change-Id: I557ead9f88fa0d6a19b1cb55b23bba1100fcb8f2 Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
This commit is contained in:
parent
45401230cf
commit
2f992cba32
@ -1661,7 +1661,9 @@ class Project(object):
|
|||||||
|
|
||||||
if not current_branch_only:
|
if not current_branch_only:
|
||||||
# Fetch whole repo
|
# Fetch whole repo
|
||||||
if no_tags:
|
# If using depth then we should not get all the tags since they may
|
||||||
|
# be outside of the depth.
|
||||||
|
if no_tags or depth:
|
||||||
cmd.append('--no-tags')
|
cmd.append('--no-tags')
|
||||||
else:
|
else:
|
||||||
cmd.append('--tags')
|
cmd.append('--tags')
|
||||||
|
Loading…
Reference in New Issue
Block a user