summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2016-02-22 11:23:35 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-02-22 18:23:55 (GMT)
commit30598ad06f2adfef1f74d6348677358865cbf373 (patch)
tree26384fa5cdedcc280625f416f899086c5ac5823d /cache.h
parent2f29c1bf34ec12c24072bb54a2c009bd1f17a2ee (diff)
downloadgit-30598ad06f2adfef1f74d6348677358865cbf373.zip
git-30598ad06f2adfef1f74d6348677358865cbf373.tar.gz
git-30598ad06f2adfef1f74d6348677358865cbf373.tar.bz2
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 'cache.h')
-rw-r--r--cache.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/cache.h b/cache.h
index 59948b6..08046ba 100644
--- a/cache.h
+++ b/cache.h
@@ -1484,7 +1484,7 @@ extern int update_server_info(int);
/* git_config_parse_key() returns these negated: */
#define CONFIG_INVALID_KEY 1
#define CONFIG_NO_SECTION_OR_NAME 2
-/* git_config_set(), git_config_set_multivar() return the above or these: */
+/* git_config_set_gently(), git_config_set_multivar_gently() return the above or these: */
#define CONFIG_NO_LOCK -1
#define CONFIG_INVALID_FILE 3
#define CONFIG_NO_WRITE 4
@@ -1522,15 +1522,15 @@ extern int git_config_bool(const char *, const char *);
extern int git_config_maybe_bool(const char *, const char *);
extern int git_config_string(const char **, const char *, const char *);
extern int git_config_pathname(const char **, const char *, const char *);
-extern int git_config_set_in_file(const char *, const char *, const char *);
+extern int git_config_set_in_file_gently(const char *, const char *, const char *);
extern void git_config_set_in_file_or_die(const char *, const char *, const char *);
-extern int git_config_set(const char *, const char *);
+extern int git_config_set_gently(const char *, const char *);
extern void git_config_set_or_die(const char *, const char *);
extern int git_config_parse_key(const char *, char **, int *);
extern int git_config_key_is_valid(const char *key);
-extern int git_config_set_multivar(const char *, const char *, const char *, int);
+extern int git_config_set_multivar_gently(const char *, const char *, const char *, int);
extern void git_config_set_multivar_or_die(const char *, const char *, const char *, int);
-extern int git_config_set_multivar_in_file(const char *, const char *, const char *, const char *, int);
+extern int git_config_set_multivar_in_file_gently(const char *, const char *, const char *, const char *, int);
extern void git_config_set_multivar_in_file_or_die(const char *, const char *, const char *, const char *, int);
extern int git_config_rename_section(const char *, const char *);
extern int git_config_rename_section_in_file(const char *, const char *, const char *);