mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-06-28 20:17:26 +00:00
implement optional 'sync-tags' in the manifest file
Allow the 'default' and 'project' element in the manifest file to apply "--no-tags" option equivalent. Change-Id: I7e0f8c17a0e25cca744d45df049076d203c52ff5 Signed-off-by: YOUNG HO CHA <ganadist@gmail.com>
This commit is contained in:
@ -660,6 +660,7 @@ class Project(object):
|
||||
groups=None,
|
||||
sync_c=False,
|
||||
sync_s=False,
|
||||
sync_tags=True,
|
||||
clone_depth=None,
|
||||
upstream=None,
|
||||
parent=None,
|
||||
@ -683,6 +684,7 @@ class Project(object):
|
||||
groups: The `groups` attribute of manifest.xml's project element.
|
||||
sync_c: The `sync-c` attribute of manifest.xml's project element.
|
||||
sync_s: The `sync-s` attribute of manifest.xml's project element.
|
||||
sync_tags: The `sync-tags` attribute of manifest.xml's project element.
|
||||
upstream: The `upstream` attribute of manifest.xml's project element.
|
||||
parent: The parent Project object.
|
||||
is_derived: False if the project was explicitly defined in the manifest;
|
||||
@ -715,6 +717,7 @@ class Project(object):
|
||||
self.groups = groups
|
||||
self.sync_c = sync_c
|
||||
self.sync_s = sync_s
|
||||
self.sync_tags = sync_tags
|
||||
self.clone_depth = clone_depth
|
||||
self.upstream = upstream
|
||||
self.parent = parent
|
||||
@ -1289,6 +1292,10 @@ class Project(object):
|
||||
elif self.manifest.default.sync_c:
|
||||
current_branch_only = True
|
||||
|
||||
if not no_tags:
|
||||
if not self.sync_tags:
|
||||
no_tags = True
|
||||
|
||||
if self.clone_depth:
|
||||
depth = self.clone_depth
|
||||
else:
|
||||
@ -1900,6 +1907,7 @@ class Project(object):
|
||||
groups=self.groups,
|
||||
sync_c=self.sync_c,
|
||||
sync_s=self.sync_s,
|
||||
sync_tags=self.sync_tags,
|
||||
parent=self,
|
||||
is_derived=True)
|
||||
result.append(subproject)
|
||||
|
Reference in New Issue
Block a user