diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-03-14 14:24:40 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-03-14 14:24:40 -0700 |
commit | 08f36302b5d04cf06a35acc91689b0278cbf6a73 (patch) | |
tree | d67f2fe4e3afff5baa4d9e955429f4b950fca008 /cache.h | |
parent | 7aab05d2b4114c932f433a8de20707b9c56f8cd3 (diff) | |
parent | 3caec73b5568341c5d8f303692423a8e9fb0cb39 (diff) | |
download | git-08f36302b5d04cf06a35acc91689b0278cbf6a73.tar.gz |
Merge branch 'ks/config-file-stdin'
"git config" learned to read from the standard input when "-" is
given as the value to its "--file" parameter (attempting an
operation to update the configuration in the standard input of
course is rejected).
* ks/config-file-stdin:
config: teach "git config --file -" to read from the standard input
config: change git_config_with_options() interface
builtin/config.c: rename check_blob_write() -> check_write()
config: disallow relative include paths from blobs
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1148,6 +1148,12 @@ extern int update_server_info(int); #define CONFIG_INVALID_PATTERN 6 #define CONFIG_GENERIC_ERROR 7 +struct git_config_source { + unsigned int use_stdin:1; + const char *file; + const char *blob; +}; + typedef int (*config_fn_t)(const char *, const char *, void *); extern int git_default_config(const char *, const char *, void *); extern int git_config_from_file(config_fn_t fn, const char *, void *); @@ -1157,8 +1163,7 @@ extern void git_config_push_parameter(const char *text); extern int git_config_from_parameters(config_fn_t fn, void *data); extern int git_config(config_fn_t fn, void *); extern int git_config_with_options(config_fn_t fn, void *, - const char *filename, - const char *blob_ref, + struct git_config_source *config_source, int respect_includes); extern int git_config_early(config_fn_t fn, void *, const char *repo_config); extern int git_parse_ulong(const char *, unsigned long *); |