diff options
author | Patrick Steinhardt <ps@pks.im> | 2016-02-22 12:23:35 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-02-22 10:23:55 -0800 |
commit | 30598ad06f2adfef1f74d6348677358865cbf373 (patch) | |
tree | 26384fa5cdedcc280625f416f899086c5ac5823d /builtin/clone.c | |
parent | compat: die when unable to set core.precomposeunicode (diff) | |
download | tgif-30598ad06f2adfef1f74d6348677358865cbf373.tar.xz |
config: rename git_config_set to git_config_set_gently
The desired default behavior for `git_config_set` is to die
whenever an error occurs. Dying is the default for a lot of
internal functions when failures occur and is in this case the
right thing to do for most callers as otherwise we might run into
inconsistent repositories without noticing.
As some code may rely on the actual return values for
`git_config_set` we still require the ability to invoke these
functions without aborting. Rename the existing `git_config_set`
functions to `git_config_set_gently` to keep them available for
those callers.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/clone.c')
-rw-r--r-- | builtin/clone.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/clone.c b/builtin/clone.c index 2dabce9816..a46d3d0f81 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -732,7 +732,7 @@ static int checkout(void) static int write_one_config(const char *key, const char *value, void *data) { - return git_config_set_multivar(key, value ? value : "true", "^$", 0); + return git_config_set_multivar_gently(key, value ? value : "true", "^$", 0); } static void write_config(struct string_list *config) |