diff options
author | Luis R. Rodriguez <mcgrof@do-not-panic.com> | 2013-10-21 11:08:29 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2013-10-28 21:33:03 +0100 |
commit | 2fa29a1905e0d496008bbf299c4423b26f633eed (patch) | |
tree | 62c43cb18e6545cdc5ae7a2939e22860f19a08e4 | |
parent | 83dfc72a9a425fdceb8cfd14f3ab0b0f8d445814 (diff) |
lib/bpgit.py: add support for git paranoia
Upstream commit: f9fa9dac70b99a2cf12b494a9fe4440404a30c4e
This cleans sanitizes a source tree and ensures
no content is present from what was intended.
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
-rw-r--r-- | lib/bpgit.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/bpgit.py b/lib/bpgit.py index 02f6d8a7..65403367 100644 --- a/lib/bpgit.py +++ b/lib/bpgit.py @@ -119,6 +119,13 @@ def verify(git_tree): return dict(r=process.returncode, output=stdout) +def paranoia(tree): + clean(tree) + poo = status(tree) + if (poo): + return dict(r=-1, output=poo) + return verify(tree) + def init(tree=None): process = subprocess.Popen(['git', 'init'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, |