diff options
author | Neeraj Singh <neerajsi@microsoft.com> | 2022-04-04 22:20:14 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-04-06 13:13:26 -0700 |
commit | 8a94d833497f3b8232684271c80a7da56f930939 (patch) | |
tree | f1f78807acd321877db3ea1294363e3b5c677826 /compat/mingw.h | |
parent | 425d290ce564ada84a5322545dbbd1866f2a29c4 (diff) | |
download | git-8a94d833497f3b8232684271c80a7da56f930939.tar.gz |
core.fsync: use batch mode and sync loose objects by default on Windows
Git for Windows has defaulted to core.fsyncObjectFiles=true since
September 2017. We turn on syncing of loose object files with batch mode
in upstream Git so that we can get broad coverage of the new code
upstream.
We don't actually do fsyncs in the most of the test suite, since
GIT_TEST_FSYNC is set to 0. However, we do exercise all of the
surrounding batch mode code since GIT_TEST_FSYNC merely makes the
maybe_fsync wrapper always appear to succeed.
Signed-off-by: Neeraj Singh <neerajsi@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/mingw.h')
-rw-r--r-- | compat/mingw.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compat/mingw.h b/compat/mingw.h index 6074a3d3ce..afe30868c0 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -332,6 +332,9 @@ int mingw_getpagesize(void); int win32_fsync_no_flush(int fd); #define fsync_no_flush win32_fsync_no_flush +#define FSYNC_COMPONENTS_PLATFORM_DEFAULT (FSYNC_COMPONENTS_DEFAULT | FSYNC_COMPONENT_LOOSE_OBJECT) +#define FSYNC_METHOD_DEFAULT (FSYNC_METHOD_BATCH) + struct rlimit { unsigned int rlim_cur; }; |