repocache: clean out stale submodules, too
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Mon, 1 Sep 2014 13:02:34 +0000 (16:02 +0300)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 2 Sep 2014 13:27:56 +0000 (16:27 +0300)
Use "double force" when doing git-clean, in order to remove untracked
submodule directories, too. From git-clean manpage:
    -d  Remove untracked directories in addition to untracked files. If
        an untracked directory is managed by a different Git repository,
        it is not removed by default. Use -f option twice if you really
        want to remove such a directory.

Change-Id: I95235d492bdb943c26316843b7d823b7d07b427b
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gbp_repocache/__init__.py

index 3e0879c80425bcab20742ba97531b856964b3db3..c129baebcf13ece09630eac3dfb1865147d9f1c5 100644 (file)
@@ -100,7 +100,7 @@ class MirrorGitRepository(GitRepository): # pylint: disable=R0904
 
     def force_clean(self):
         """Clean repository"""
-        self._git_command('clean', ['-f', '-d', '-x'])
+        self._git_command('clean', ['-f', '-f', '-d', '-x'])
 
     @classmethod
     def clone(cls, path, url, bare=False):