summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
authorDavid Pursehouse <dpursehouse@collab.net>2018-10-28 23:30:50 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-10-28 23:30:50 +0000
commit36391bf5caa29cecaa1e7c4cfd3db503e34a17e6 (patch)
tree8759a8d50ab6fe1c968185c14f9ddf22ed98e6db /project.py
parentbed8b62345e484b27e048e8f21280c5611f795df (diff)
parent09f0abb0efde83cfc4b850ebdc41f6ed3b61a123 (diff)
downloadgit-repo-36391bf5caa29cecaa1e7c4cfd3db503e34a17e6.tar.gz
Merge "init: --dissociate option to copy objects borrowed with --reference"
Diffstat (limited to 'project.py')
-rwxr-xr-xproject.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/project.py b/project.py
index ddcffdd6..84e3684d 100755
--- a/project.py
+++ b/project.py
@@ -1310,6 +1310,16 @@ class Project(object):
1310 submodules=submodules)): 1310 submodules=submodules)):
1311 return False 1311 return False
1312 1312
1313 mp = self.manifest.manifestProject
1314 dissociate = mp.config.GetBoolean('repo.dissociate')
1315 if dissociate:
1316 alternates_file = os.path.join(self.gitdir, 'objects/info/alternates')
1317 if os.path.exists(alternates_file):
1318 cmd = ['repack', '-a', '-d']
1319 if GitCommand(self, cmd, bare=True).Wait() != 0:
1320 return False
1321 platform_utils.remove(alternates_file)
1322
1313 if self.worktree: 1323 if self.worktree:
1314 self._InitMRef() 1324 self._InitMRef()
1315 else: 1325 else: