From f9fa9dac70b99a2cf12b494a9fe4440404a30c4e Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Mon, 21 Oct 2013 11:08:29 +0200 Subject: [PATCH] lib/bpgit.py: add support for git paranoia This cleans sanitizes a source tree and ensures no content is present from what was intended. Signed-off-by: Luis R. Rodriguez --- lib/bpgit.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/bpgit.py b/lib/bpgit.py index 02f6d8a77be9..65403367724d 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, -- 2.30.2