diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2014-03-31 09:58:44 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-04-18 16:07:33 +0200 |
commit | 523032cd24e5b238752394bd1b691a3e28ba321e (patch) | |
tree | d112c7c8a850ef30e1043b4e679d61e6a5725c66 /include/git2/sys/config.h | |
parent | eaf3703401a64d59fd8bf2609449343d739ef056 (diff) | |
download | libgit2-523032cd24e5b238752394bd1b691a3e28ba321e.tar.gz |
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.
Diffstat (limited to 'include/git2/sys/config.h')
-rw-r--r-- | include/git2/sys/config.h | 2 |
1 files changed, 1 insertions, 1 deletions
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); |