Thread (7 messages) flat view 7 messages, 3 authors, 2020-11-17
STALE2133d

[PATCH 0/2] config: allow specifying config entries via envvar pairs

From: Patrick Steinhardt <hidden>
Date: 2020-11-13 12:16:22

Hi,

this patch series adds a way to specify config entries via separate
envvars `GIT_CONFIG_KEY_$n` and `GIT_CONFIG_VALUE_$n`. There's two main
motivations:

    1. `GIT_CONFIG_PARAMETERS` is undocumented and requires parsing of
       the key-value pairs. This requires the user to properly escape
       all potentially harmful characters, which may be hard if the
       value is controlled by a third party.

    2. `git -c key=val` is not really suited to contain sensitive
       information, as command line arguments trivially show up in e.g.
       ps(1).

This new way of passing envvars tries to fix both of those shortcomings.

Patrick

Patrick Steinhardt (2):
  config: extract function to parse config pairs
  config: allow specifying config entries via envvar pairs

 Documentation/git-config.txt |  6 ++++
 config.c                     | 65 ++++++++++++++++++++++++++----------
 t/t1300-config.sh            | 23 +++++++++++++
 3 files changed, 76 insertions(+), 18 deletions(-)

-- 
2.29.2

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help