summary refs log tree commit diff
path: root/bulk-checkin.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-03-25 16:38:24 -0700
committerJunio C Hamano <gitster@pobox.com>2022-03-25 16:38:24 -0700
commiteb804cd405618ef78b772072685c39392aea4ac1 (patch)
treec86dd22ade3bf93d03d9ac01c507c6254c8fee7a /bulk-checkin.c
parenta68dfadae5e95c7f255cf38c9efdcbc2e36d1931 (diff)
parentb9f5d0358d2e882d47f496c1a5589f6cebc25578 (diff)
Merge branch 'ns/core-fsyncmethod'
Replace core.fsyncObjectFiles with two new configuration variables,
core.fsync and core.fsyncMethod.

* ns/core-fsyncmethod:
  core.fsync: documentation and user-friendly aggregate options
  core.fsync: new option to harden the index
  core.fsync: add configuration parsing
  core.fsync: introduce granular fsync control infrastructure
  core.fsyncmethod: add writeout-only mode
  wrapper: make inclusion of Windows csprng header tightly scoped
Diffstat (limited to 'bulk-checkin.c')
-rw-r--r--bulk-checkin.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bulk-checkin.c b/bulk-checkin.c
index 85b3ebaf97..6d6c37171c 100644
--- a/bulk-checkin.c
+++ b/bulk-checkin.c
@@ -53,9 +53,10 @@ static void finish_bulk_checkin(struct bulk_checkin_state *state)
 		unlink(state->pack_tmp_name);
 		goto clear_exit;
 	} else if (state->nr_written == 1) {
-		finalize_hashfile(state->f, hash, CSUM_HASH_IN_STREAM | CSUM_FSYNC | CSUM_CLOSE);
+		finalize_hashfile(state->f, hash, FSYNC_COMPONENT_PACK,
+				  CSUM_HASH_IN_STREAM | CSUM_FSYNC | CSUM_CLOSE);
 	} else {
-		int fd = finalize_hashfile(state->f, hash, 0);
+		int fd = finalize_hashfile(state->f, hash, FSYNC_COMPONENT_PACK, 0);
 		fixup_pack_header_footer(fd, hash, state->pack_tmp_name,
 					 state->nr_written, hash,
 					 state->offset);