File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,14 @@ func EnableStrictHashVerification(enabled bool) error {
101101 }
102102}
103103
104+ func EnableFsyncGitDir (enabled bool ) error {
105+ if enabled {
106+ return setSizet (C .GIT_OPT_ENABLE_FSYNC_GITDIR , 1 )
107+ } else {
108+ return setSizet (C .GIT_OPT_ENABLE_FSYNC_GITDIR , 0 )
109+ }
110+ }
111+
104112func CachedMemory () (current int , allowed int , err error ) {
105113 return getSizetSizet (C .GIT_OPT_GET_CACHED_MEMORY )
106114}
Original file line number Diff line number Diff line change @@ -65,6 +65,14 @@ func TestEnableStrictHashVerification(t *testing.T) {
6565 checkFatal (t , err )
6666}
6767
68+ func TestEnableFsyncGitDir (t * testing.T ) {
69+ err := EnableFsyncGitDir (false )
70+ checkFatal (t , err )
71+
72+ err = EnableFsyncGitDir (true )
73+ checkFatal (t , err )
74+ }
75+
6876func TestCachedMemory (t * testing.T ) {
6977 current , allowed , err := CachedMemory ()
7078 checkFatal (t , err )
You can’t perform that action at this time.
0 commit comments