summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba
diff options
context:
space:
mode:
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r--buildtools/wafsamba/samba_version.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/buildtools/wafsamba/samba_version.py b/buildtools/wafsamba/samba_version.py
index 076615b6c4..4f99b2c087 100644
--- a/buildtools/wafsamba/samba_version.py
+++ b/buildtools/wafsamba/samba_version.py
@@ -49,9 +49,10 @@ def git_version_summary(path, env=None):
if not 'GIT' in env:
return ("GIT-UNKNOWN", {})
- os.putenv('GIT_DIR', '%s/.git' % path)
- os.putenv('GIT_WORK_TREE', path)
- git = Utils.cmd_output(env.GIT + ' show --pretty=format:"%h%n%ct%n%H%n%cd" --stat HEAD', silent=True)
+ environ = dict(os.environ)
+ environ["GIT_DIR"] = '%s/.git' % path
+ environ["GIT_WORK_TREE"] = path
+ git = Utils.cmd_output(env.GIT + ' show --pretty=format:"%h%n%ct%n%H%n%cd" --stat HEAD', silent=True, env=environ)
lines = git.splitlines()
if not lines or len(lines) < 4: