From b4d43b9f664d6472b6c1e91c98f951037d00cea5 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Tue, 28 Apr 2015 18:28:12 +0900 Subject: [PATCH] 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 --- project.py | 2 ++ 1 file changed, 2 insertions(+) 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): cmd.append('--quiet') if not self.worktree: cmd.append('--update-head-ok') + if self.manifest.IsMirror: + cmd.append('--prune') cmd.append(name) # If using depth then we should not get all the tags since they may