Add ENABLE_SYNCHRONIZED_OBJECT_CREATION option

Allow users to enable `SYNCHRONIZED_OBJECT_CREATION` with a setting.
This commit is contained in:
Edward Thomson
2016-12-13 10:58:43 -05:00
parent fc27fe213c
commit 6d3ad7e09e
5 changed files with 16 additions and 1 deletions

View File

@@ -179,6 +179,7 @@ typedef enum {
GIT_OPT_SET_SSL_CIPHERS,
GIT_OPT_GET_USER_AGENT,
GIT_OPT_ENABLE_OFS_DELTA,
GIT_OPT_ENABLE_SYNCHRONIZED_OBJECT_CREATION,
} git_libgit2_opt_t;
/**
@@ -316,6 +317,13 @@ typedef enum {
* > Packfiles containing offset deltas can still be read.
* > This defaults to enabled.
*
* * opts(GIT_OPT_ENABLE_SYNCHRONIZED_OBJECT_CREATION, int enabled)
*
* > Enable synchronized writes of new objects using `fsync`
* > (or the platform equivalent) to ensure that new object data
* > is written to permanent storage, not simply cached. This
* > defaults to disabled.
*
* @param option Option key
* @param ... value to set the option
* @return 0 on success, <0 on failure