Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-06-04 00:30:34 +0300
committerJunio C Hamano <gitster@pobox.com>2022-06-04 00:30:34 +0300
commit83937e9592832408670da38bfe6e96c90ad63521 (patch)
tree20c6895015e2c281780eba0fead78aef3862ed8e /git-compat-util.h
parent377d347eb3b1a23ece080dc5e5b8df6958c56e96 (diff)
parent112a9fe60d7c5f02ee1a805d8730d54a458b7ad1 (diff)
Merge branch 'ns/batch-fsync'
Introduce a filesystem-dependent mechanism to optimize the way the bits for many loose object files are ensured to hit the disk platter. * ns/batch-fsync: core.fsyncmethod: performance tests for batch mode t/perf: add iteration setup mechanism to perf-lib core.fsyncmethod: tests for batch mode test-lib-functions: add parsing helpers for ls-files and ls-tree core.fsync: use batch mode and sync loose objects by default on Windows unpack-objects: use the bulk-checkin infrastructure update-index: use the bulk-checkin infrastructure builtin/add: add ODB transaction around add_files_to_cache cache-tree: use ODB transaction around writing a tree core.fsyncmethod: batched disk flushes for loose-objects bulk-checkin: rebrand plug/unplug APIs as 'odb transactions' bulk-checkin: rename 'state' variable and separate 'plugged' boolean
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index 96293b6c43..ddc3fa2a4e 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -1324,11 +1324,13 @@ __attribute__((format (printf, 3, 4))) NORETURN
void BUG_fl(const char *file, int line, const char *fmt, ...);
#define BUG(...) BUG_fl(__FILE__, __LINE__, __VA_ARGS__)
+#ifndef FSYNC_METHOD_DEFAULT
#ifdef __APPLE__
#define FSYNC_METHOD_DEFAULT FSYNC_METHOD_WRITEOUT_ONLY
#else
#define FSYNC_METHOD_DEFAULT FSYNC_METHOD_FSYNC
#endif
+#endif
enum fsync_action {
FSYNC_WRITEOUT_ONLY,