File tree 2 files changed +16
-0
lines changed
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 {
101
101
}
102
102
}
103
103
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
+
104
112
func CachedMemory () (current int , allowed int , err error ) {
105
113
return getSizetSizet (C .GIT_OPT_GET_CACHED_MEMORY )
106
114
}
Original file line number Diff line number Diff line change @@ -65,6 +65,14 @@ func TestEnableStrictHashVerification(t *testing.T) {
65
65
checkFatal (t , err )
66
66
}
67
67
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
+
68
76
func TestCachedMemory (t * testing.T ) {
69
77
current , allowed , err := CachedMemory ()
70
78
checkFatal (t , err )
You can’t perform that action at this time.
0 commit comments