vendor/libgit2/src/pack-objects.c in rugged-0.26.0b5 vs vendor/libgit2/src/pack-objects.c in rugged-0.26.0

- old
+ new

@@ -1383,15 +1383,19 @@ void *progress_cb_payload) { git_indexer *indexer; git_transfer_progress stats; struct pack_write_context ctx; + int t; PREPARE_PACK; if (git_indexer_new( &indexer, path, mode, pb->odb, progress_cb, progress_cb_payload) < 0) return -1; + + if (!git_repository__cvar(&t, pb->repo, GIT_CVAR_FSYNCOBJECTFILES) && t) + git_indexer__set_fsync(indexer, 1); ctx.indexer = indexer; ctx.stats = &stats; if (git_packbuilder_foreach(pb, write_cb, &ctx) < 0 ||