summaryrefslogtreecommitdiff
path: root/environment.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2021-01-12 13:27:01 +0100
committerJunio C Hamano <gitster@pobox.com>2021-01-15 13:03:18 -0800
commit1ff21c05ba99ed2d0ade8318e3cb0c1a3f8d4b80 (patch)
tree5a5c333541cec7abf57326559fc958a556dadc7b /environment.c
parentf9dbb64fadf599c588a39d2251bb3f9a2f7d572a (diff)
downloadgit-1ff21c05ba99ed2d0ade8318e3cb0c1a3f8d4b80.tar.gz
config: store "git -c" variables using more robust format
The previous commit added a new format for $GIT_CONFIG_PARAMETERS which is able to robustly handle subsections with "=" in them. Let's start writing the new format. Unfortunately, this does much less than you'd hope, because "git -c" itself has the same ambiguity problem! But it's still worth doing: - we've now pushed the problem from the inter-process communication into the "-c" command-line parser. This would free us up to later add an unambiguous format there (e.g., separate arguments like "git --config key value", etc). - for --config-env, the parser already disallows "=" in the environment variable name. So: git --config-env section.with=equals.key=ENVVAR will robustly set section.with=equals.key to the contents of $ENVVAR. The new test shows the improvement for --config-env. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'environment.c')
0 files changed, 0 insertions, 0 deletions