From 1fcc9d87430e41cc333ce5b2431df7058e03bbb7 Mon Sep 17 00:00:00 2001 From: James Fargher Date: Tue, 18 Jan 2022 15:51:39 +1300 Subject: Add EnableFsyncGitDir to enable synchronized writes to the gitdir (#874) This adds support for the GIT_OPT_ENABLE_FSYNC_GITDIR option in libgit2. Co-authored-by: James Fargher --- settings_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'settings_test.go') diff --git a/settings_test.go b/settings_test.go index 47eb711..e3761d4 100644 --- a/settings_test.go +++ b/settings_test.go @@ -65,6 +65,14 @@ func TestEnableStrictHashVerification(t *testing.T) { checkFatal(t, err) } +func TestEnableFsyncGitDir(t *testing.T) { + err := EnableFsyncGitDir(false) + checkFatal(t, err) + + err = EnableFsyncGitDir(true) + checkFatal(t, err) +} + func TestCachedMemory(t *testing.T) { current, allowed, err := CachedMemory() checkFatal(t, err) -- cgit v1.2.3