diff options
Diffstat (limited to 'src/pack-objects.c')
-rw-r--r-- | src/pack-objects.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pack-objects.c b/src/pack-objects.c index 58b7b94b3..ef272e8f5 100644 --- a/src/pack-objects.c +++ b/src/pack-objects.c @@ -1385,6 +1385,7 @@ int git_packbuilder_write( git_indexer *indexer; git_transfer_progress stats; struct pack_write_context ctx; + int t; PREPARE_PACK; @@ -1392,6 +1393,9 @@ int git_packbuilder_write( &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; |