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 22:20:17 +0100 |
commit | 634cebf89904b9cd07158ead407afbb89298fa29 (patch) | |
tree | 3962ee6c2245c9c4619bcbc675e532fe4032af45 | |
parent | 2737db5050c94b3a65c25b4bea482dd79fdfc50b (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, |