From 59df9bd4d22715b03d1b765321021a59ebc9366b Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Thu, 29 Nov 2012 22:26:08 +0000 Subject: Git clean not out-of-source modules instead of removing --- (limited to 'devbot/git.py') diff --git a/devbot/git.py b/devbot/git.py index 55fd9f5..8db61d2 100644 --- a/devbot/git.py +++ b/devbot/git.py @@ -36,3 +36,13 @@ class Module: command.run(["git", "checkout", self.tag]) else: command.run(["git", "merge", "origin", self._branch]) + + def clean(self): + try: + os.chdir(self.local) + except OSError: + return False + + command.run(["git", "clean", "-fdx"]) + + return True -- cgit v0.9.1