summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@sonymobile.com>2015-04-28 18:28:12 +0900
committerDavid Pursehouse <david.pursehouse@sonymobile.com>2015-04-30 10:32:37 +0900
commitb4d43b9f664d6472b6c1e91c98f951037d00cea5 (patch)
treec75e26c4763222dde9526443781fd8f2d47f74fd /project.py
parent4ccad7554b958c701653c41a72442cccf301e71a (diff)
downloadgit-repo-b4d43b9f664d6472b6c1e91c98f951037d00cea5.tar.gz
Add --prune option to fetch when syncing a mirror repo
When syncing a mirror repo, add the --prune option to the fetch command to force removal of stale refs from the mirror. Change-Id: I4b43b2a5c86b9915627887c16f6569066f3ab978
Diffstat (limited to 'project.py')
-rw-r--r--project.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/project.py b/project.py
index 6217aec8..1e525b38 100644
--- a/project.py
+++ b/project.py
@@ -1836,6 +1836,8 @@ class Project(object):
1836 cmd.append('--quiet') 1836 cmd.append('--quiet')
1837 if not self.worktree: 1837 if not self.worktree:
1838 cmd.append('--update-head-ok') 1838 cmd.append('--update-head-ok')
1839 if self.manifest.IsMirror:
1840 cmd.append('--prune')
1839 cmd.append(name) 1841 cmd.append(name)
1840 1842
1841 # If using depth then we should not get all the tags since they may 1843 # If using depth then we should not get all the tags since they may