diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-02-25 15:47:33 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-02-25 15:47:33 -0800 |
commit | 6249ce2d1b9b60e7aa630d370e68c87ef6331629 (patch) | |
tree | fafbfe509b3e197c0b1681d417d2cd1d220d8b84 /config.h | |
parent | 268e6b8d4d95d9ade705666e152a4c054da32a47 (diff) | |
parent | 3ce113827287079dced9aaf9c5d1e1734ecaa265 (diff) | |
download | git-6249ce2d1b9b60e7aa630d370e68c87ef6331629.tar.gz |
Merge branch 'ds/sparse-checkout-requires-per-worktree-config'
"git sparse-checkout" wants to work with per-worktree configuration,
but did not work well in a worktree attached to a bare repository.
* ds/sparse-checkout-requires-per-worktree-config:
config: make git_configset_get_string_tmp() private
worktree: copy sparse-checkout patterns and config on add
sparse-checkout: set worktree-config correctly
config: add repo_config_set_worktree_gently()
worktree: create init_worktree_config()
Documentation: add extensions.worktreeConfig details
Diffstat (limited to 'config.h')
-rw-r--r-- | config.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -267,6 +267,13 @@ void git_config_set_in_file(const char *, const char *, const char *); int git_config_set_gently(const char *, const char *); /** + * Write a config value that should apply to the current worktree. If + * extensions.worktreeConfig is enabled, then the write will happen in the + * current worktree's config. Otherwise, write to the common config file. + */ +int repo_config_set_worktree_gently(struct repository *, const char *, const char *); + +/** * write config values to `.git/config`, takes a key/value pair as parameter. */ void git_config_set(const char *, const char *); @@ -294,6 +301,7 @@ int git_config_parse_key(const char *, char **, size_t *); int git_config_set_multivar_gently(const char *, const char *, const char *, unsigned); void git_config_set_multivar(const char *, const char *, const char *, unsigned); +int repo_config_set_multivar_gently(struct repository *, const char *, const char *, const char *, unsigned); int git_config_set_multivar_in_file_gently(const char *, const char *, const char *, const char *, unsigned); /** @@ -466,7 +474,6 @@ void git_configset_clear(struct config_set *cs); int git_configset_get_value(struct config_set *cs, const char *key, const char **dest); int git_configset_get_string(struct config_set *cs, const char *key, char **dest); -int git_configset_get_string_tmp(struct config_set *cs, const char *key, const char **dest); int git_configset_get_int(struct config_set *cs, const char *key, int *dest); int git_configset_get_ulong(struct config_set *cs, const char *key, unsigned long *dest); int git_configset_get_bool(struct config_set *cs, const char *key, int *dest); |