From: Stefan Metzmacher Date: Tue, 12 Apr 2022 15:04:53 +0000 (+0000) Subject: script/autobuild.py: allow to run from within git rebase -i X-Git-Tag: talloc-2.3.4~312 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07081d03da2a49010fdc905a39e48dd589be47b2;p=thirdparty%2Fsamba.git script/autobuild.py: allow to run from within git rebase -i The 'git clone' used by autobuild.py fails if GIT_DIR and GIT_WORK_TREE are already defined in the environment. Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Thu Apr 28 15:23:24 UTC 2022 on sn-devel-184 --- diff --git a/script/autobuild.py b/script/autobuild.py index d309fa0e97c..9f790d8a53e 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -31,6 +31,11 @@ os.environ["PYTHONUNBUFFERED"] = "1" # This speeds up testing remarkably. os.environ['TDB_NO_FSYNC'] = '1' +# allow autobuild to run within git rebase -i +if "GIT_DIR" in os.environ: + del os.environ["GIT_DIR"] +if "GIT_WORK_TREE" in os.environ: + del os.environ["GIT_WORK_TREE"] def find_git_root(): '''get to the top of the git repo'''