summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2017-03-22 20:29:22 +0000
committerGitHub <noreply@github.com>2017-03-22 20:29:22 +0000
commit6fd6c67824d2caad9f8716a676820d8319f79a9d (patch)
tree00393d0a78fe42c3c007ca71e8da50374781d437 /include/git2
parent7e53e8ce454b31e933b7ad6df90ffdfdc678cd81 (diff)
parent1c04a96b25da048221f31ecee0227d960dc00489 (diff)
downloadlibgit2-6fd6c67824d2caad9f8716a676820d8319f79a9d.tar.gz
Merge pull request #4030 from libgit2/ethomson/fsync
fsync all the things
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/common.h8
-rw-r--r--include/git2/odb_backend.h2
2 files changed, 9 insertions, 1 deletions
diff --git a/include/git2/common.h b/include/git2/common.h
index f13dfd509..c909f86ca 100644
--- a/include/git2/common.h
+++ b/include/git2/common.h
@@ -179,6 +179,7 @@ typedef enum {
GIT_OPT_SET_SSL_CIPHERS,
GIT_OPT_GET_USER_AGENT,
GIT_OPT_ENABLE_OFS_DELTA,
+ GIT_OPT_ENABLE_SYNCHRONOUS_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_SYNCHRONOUS_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
diff --git a/include/git2/odb_backend.h b/include/git2/odb_backend.h
index b17cfd8ba..9199538ce 100644
--- a/include/git2/odb_backend.h
+++ b/include/git2/odb_backend.h
@@ -39,7 +39,7 @@ GIT_EXTERN(int) git_odb_backend_pack(git_odb_backend **out, const char *objects_
* @param out location to store the odb backend pointer
* @param objects_dir the Git repository's objects directory
* @param compression_level zlib compression level to use
- * @param do_fsync whether to do an fsync() after writing (currently ignored)
+ * @param do_fsync whether to do an fsync() after writing
* @param dir_mode permissions to use creating a directory or 0 for defaults
* @param file_mode permissions to use creating a file or 0 for defaults
*