diff options
author | Edward Thomson <ethomson@github.com> | 2016-12-13 10:58:43 -0500 |
---|---|---|
committer | Edward Thomson <ethomson@github.com> | 2017-02-28 13:27:49 +0000 |
commit | 6d3ad7e09ee4b101e8e68f38783e3e4139bc2691 (patch) | |
tree | 9d8da7807ac802c2c77eef1a6a37a420f0468466 /src/odb_loose.c | |
parent | fc27fe213c8462c8413486b8c2bfb82b25b3e7e6 (diff) | |
download | libgit2-6d3ad7e09ee4b101e8e68f38783e3e4139bc2691.tar.gz |
Add `ENABLE_SYNCHRONIZED_OBJECT_CREATION` option
Allow users to enable `SYNCHRONIZED_OBJECT_CREATION` with a setting.
Diffstat (limited to 'src/odb_loose.c')
-rw-r--r-- | src/odb_loose.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/odb_loose.c b/src/odb_loose.c index 8796f4bae..5a80b7a4b 100644 --- a/src/odb_loose.c +++ b/src/odb_loose.c @@ -14,6 +14,7 @@ #include "odb.h" #include "delta.h" #include "filebuf.h" +#include "object.h" #include "git2/odb_backend.h" #include "git2/types.h" @@ -843,7 +844,7 @@ static int filebuf_flags(loose_backend *backend) int flags = GIT_FILEBUF_TEMPORARY | (backend->object_zlib_level << GIT_FILEBUF_DEFLATE_SHIFT); - if (backend->fsync_object_files) + if (backend->fsync_object_files || git_object__synchronized_writing) flags |= GIT_FILEBUF_FSYNC; return flags; |