diff options
Diffstat (limited to 'include/git2/config.h')
-rw-r--r-- | include/git2/config.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/git2/config.h b/include/git2/config.h index 6d3fdb0c2..05c3ad622 100644 --- a/include/git2/config.h +++ b/include/git2/config.h @@ -689,6 +689,24 @@ GIT_EXTERN(int) git_config_backend_foreach_match( void *payload); +/** + * Lock the backend with the highest priority + * + * Locking disallows anybody else from writing to that backend. Any + * updates made after locking will not be visible to a reader until + * the file is unlocked. + * + * You can apply the changes by calling `git_transaction_commit()` + * before freeing the transaction. Either of these actions will unlock + * the config. + * + * @param tx the resulting transaction, use this to commit or undo the + * changes + * @param cfg the configuration in which to lock + * @return 0 or an error code + */ +GIT_EXTERN(int) git_config_lock(git_transaction **tx, git_config *cfg); + /** @} */ GIT_END_DECL #endif |