From 523032cd24e5b238752394bd1b691a3e28ba321e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Mon, 31 Mar 2014 09:58:44 +0200 Subject: config: refresh before reading a value With the isolation of complex reads, we can now try to refresh the on-disk file before reading a value from it. This changes the semantics a bit, as before we could be sure that a string we got from the configuration was valid until we wrote or refreshed. This is no longer the case, as a read can also invalidate the pointer. --- include/git2/sys/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/git2/sys') diff --git a/include/git2/sys/config.h b/include/git2/sys/config.h index 090588999..5d606ed06 100644 --- a/include/git2/sys/config.h +++ b/include/git2/sys/config.h @@ -57,7 +57,7 @@ struct git_config_backend { /* Open means open the file/database and parse if necessary */ int (*open)(struct git_config_backend *, git_config_level_t level); - int (*get)(const struct git_config_backend *, const char *key, const git_config_entry **entry); + int (*get)(struct git_config_backend *, const char *key, const git_config_entry **entry); int (*set)(struct git_config_backend *, const char *key, const char *value); int (*set_multivar)(git_config_backend *cfg, const char *name, const char *regexp, const char *value); int (*del)(struct git_config_backend *, const char *key); -- cgit v1.2.1