From: Daniel Martí Date: Wed, 29 Jan 2014 11:38:21 +0000 (+0100) Subject: Run submodule reset and clean before update. Also do --recursive for these. X-Git-Tag: 0.2~341^2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=63a0e859ff81cb03182af68e6c6bfff4d83386d8;p=fdroidserver.git Run submodule reset and clean before update. Also do --recursive for these. --- diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 6ccb30d0..b348af1f 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -336,18 +336,18 @@ class vcs_git(vcs): def initsubmodules(self): self.checkrepo() - if subprocess.call(['git', 'submodule', 'update', - '--init', '--recursive'], - cwd=self.local) != 0: - raise VCSException("Git submodule update failed") - if subprocess.call(['git', 'submodule', 'foreach', + if subprocess.call(['git', 'submodule', 'foreach', '--recursive', 'git', 'reset', '--hard'], cwd=self.local) != 0: raise VCSException("Git submodule reset failed") - if subprocess.call(['git', 'submodule', 'foreach', + if subprocess.call(['git', 'submodule', 'foreach', '--recursive', 'git', 'clean', '-dffx'], cwd=self.local) != 0: raise VCSException("Git submodule clean failed") + if subprocess.call(['git', 'submodule', 'update', + '--init', '--force', '--recursive'], + cwd=self.local) != 0: + raise VCSException("Git submodule update failed") def gettags(self): self.checkrepo()