diff options
-rw-r--r-- | lib/bpgit.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/bpgit.py b/lib/bpgit.py index d2fb9862..f4af314a 100644 --- a/lib/bpgit.py +++ b/lib/bpgit.py @@ -27,6 +27,16 @@ def rev_parse(rev='HEAD', tree=None): raise SHAError() return sha +def clean(tree=None): + cmd = ['git', 'clean', '-f', '-x', '-d', '-q'] + + process = subprocess.Popen(cmd, + stdout=subprocess.PIPE, stderr=subprocess.STDOUT, + close_fds=True, universal_newlines=True, cwd=tree) + stdout = process.communicate()[0] + process.wait() + _check(process) + def status(tree=None): ''' For interpretation of the porcelain output refer to |