From e9f69e067da3e096e1e64be70ec2b6de30f71d2c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 7 Apr 2021 11:33:05 +0200 Subject: Register environment variables for hermetic build configurations --- libbuild2/version/snapshot-git.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libbuild2/version') diff --git a/libbuild2/version/snapshot-git.cxx b/libbuild2/version/snapshot-git.cxx index 8eb7cc8..28d96ac 100644 --- a/libbuild2/version/snapshot-git.cxx +++ b/libbuild2/version/snapshot-git.cxx @@ -37,6 +37,12 @@ namespace build2 // prevent this we pass the git's exec directory via the --exec-path // option explicitly. // + // Note also that git has quite a few GIT_* environment variables and + // stray values for some of them could break our commands. So it may + // seem like a good idea to unset them. But on the other hand, they may + // be there for a reason: after all, we are operating on user's projects + // and user's environment may be setup to handle them. + // path p ("git"); process_path pp (run_search (p, true /* init */)); -- cgit v1.1