diff options
| author | Junio C Hamano <gitster@pobox.com> | 2021-01-25 14:19:19 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2021-01-25 14:19:19 -0800 |
| commit | 294e949fa2dfd43097b2b5614470a3e43604663d (patch) | |
| tree | 05965a5fb1413fbf6c896aa8494338af676228c4 /environment.h | |
| parent | 7eefa1349bcba7f4bb533f6e04f472c27b16ea83 (diff) | |
| parent | d8d77153eafdb0fc334e827976f09e4bdff26b58 (diff) | |
| download | git-294e949fa2dfd43097b2b5614470a3e43604663d.tar.gz | |
Merge branch 'ps/config-env-pairs'
Introduce two new ways to feed configuration variable-value pairs
via environment variables, and tweak the way GIT_CONFIG_PARAMETERS
encodes variable/value pairs to make it more robust.
* ps/config-env-pairs:
config: allow specifying config entries via envvar pairs
environment: make `getenv_safe()` a public function
config: store "git -c" variables using more robust format
config: parse more robust format in GIT_CONFIG_PARAMETERS
config: extract function to parse config pairs
quote: make sq_dequote_step() a public function
config: add new way to pass config via `--config-env`
git: add `--super-prefix` to usage string
Diffstat (limited to 'environment.h')
| -rw-r--r-- | environment.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/environment.h b/environment.h new file mode 100644 index 0000000000..d438b5c8f3 --- /dev/null +++ b/environment.h @@ -0,0 +1,12 @@ +#ifndef ENVIRONMENT_H +#define ENVIRONMENT_H + +#include "strvec.h" + +/* + * Wrapper of getenv() that returns a strdup value. This value is kept + * in argv to be freed later. + */ +const char *getenv_safe(struct strvec *argv, const char *name); + +#endif |
