Subject: [PATCH v3 0/4] config: allow specifying config entries via envvar pairs

From: Patrick Steinhardt <[email-masked]>
Date: Tue, 1 Dec 2020 10:55:52 +0100

Hi,

this is the third version of my patch series which aims to implement a
way to pass config entries via the enviroment while avoiding any
requirements to perform shell quoting on the user's side.

Major changes include:

- Another test case to test interaction of GIT_CONFIG_PARAMETERS.

- I've exposed `getenv_safe` and now use that to retrieve envvars to
  avoid platform-specific lifetime issues of returned envvar values.

- I've split out a patch which performs reindentation of preexisting
  code to make the actual code change easier to review.

Still missing is the `--config-env` way of doing things. I'd be happy to
live with both ways of doing things and adopt it as part of this series,
but I wasn't sure whether this would be welcome or not. Too many ways to
do the same thing may be confusing in the end, even though their target
audience is probably different.

Patrick

Patrick Steinhardt (4):
  environment: make `getenv_safe()` non-static
  config: extract function to parse config pairs
  config: refactor parsing of GIT_CONFIG_PARAMETERS
  config: allow specifying config entries via envvar pairs

 Documentation/git-config.txt |  12 ++++
 cache.h                      |   1 +
 config.c                     |  99 +++++++++++++++++++++++-------
 environment.c                |   8 +--
 environment.h                |  12 ++++
 t/t1300-config.sh            | 115 ++++++++++++++++++++++++++++++++++-
 6 files changed, 220 insertions(+), 27 deletions(-)
 create mode 100644 environment.h

-- 
2.29.2