File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -1204,3 +1204,37 @@ int git_odb__backend_loose(
12041204 * backend_out = (git_odb_backend * )backend ;
12051205 return 0 ;
12061206}
1207+
1208+
1209+ #ifdef GIT_EXPERIMENTAL_SHA256
1210+ int git_odb_backend_loose (
1211+ git_odb_backend * * backend_out ,
1212+ const char * objects_dir ,
1213+ git_odb_backend_loose_options * opts )
1214+ {
1215+ return git_odb__backend_loose (backend_out , objects_dir , opts );
1216+ }
1217+ #else
1218+ int git_odb_backend_loose (
1219+ git_odb_backend * * backend_out ,
1220+ const char * objects_dir ,
1221+ int compression_level ,
1222+ int do_fsync ,
1223+ unsigned int dir_mode ,
1224+ unsigned int file_mode )
1225+ {
1226+ git_odb_backend_loose_flag_t flags = 0 ;
1227+ git_odb_backend_loose_options opts = GIT_ODB_BACKEND_LOOSE_OPTIONS_INIT ;
1228+
1229+ if (do_fsync )
1230+ flags |= GIT_ODB_BACKEND_LOOSE_FSYNC ;
1231+
1232+ opts .flags = flags ;
1233+ opts .compression_level = compression_level ;
1234+ opts .dir_mode = dir_mode ;
1235+ opts .file_mode = file_mode ;
1236+ opts .oid_type = GIT_OID_DEFAULT ;
1237+
1238+ return git_odb__backend_loose (backend_out , objects_dir , & opts );
1239+ }
1240+ #endif
You can’t perform that action at this time.
0 commit comments