@@ -547,13 +547,63 @@ core.whitespace::
547547 is relevant for `indent-with-non-tab` and when Git fixes `tab-in-indent`
548548 errors. The default tab width is 8. Allowed values are 1 to 63.
549549
550+ core.fsync::
551+ A comma-separated list of components of the repository that
552+ should be hardened via the core.fsyncMethod when created or
553+ modified. You can disable hardening of any component by
554+ prefixing it with a '-'. Items that are not hardened may be
555+ lost in the event of an unclean system shutdown. Unless you
556+ have special requirements, it is recommended that you leave
557+ this option empty or pick one of `committed`, `added`,
558+ or `all`.
559+ +
560+ When this configuration is encountered, the set of components starts with
561+ the platform default value, disabled components are removed, and additional
562+ components are added. `none` resets the state so that the platform default
563+ is ignored.
564+ +
565+ The empty string resets the fsync configuration to the platform
566+ default. The default on most platforms is equivalent to
567+ `core.fsync=committed,-loose-object`, which has good performance,
568+ but risks losing recent work in the event of an unclean system shutdown.
569+ +
570+ * `none` clears the set of fsynced components.
571+ * `loose-object` hardens objects added to the repo in loose-object form.
572+ * `pack` hardens objects added to the repo in packfile form.
573+ * `pack-metadata` hardens packfile bitmaps and indexes.
574+ * `commit-graph` hardens the commit graph file.
575+ * `index` hardens the index when it is modified.
576+ * `objects` is an aggregate option that is equivalent to
577+ `loose-object,pack`.
578+ * `derived-metadata` is an aggregate option that is equivalent to
579+ `pack-metadata,commit-graph`.
580+ * `committed` is an aggregate option that is currently equivalent to
581+ `objects`. This mode sacrifices some performance to ensure that work
582+ that is committed to the repository with `git commit` or similar commands
583+ is hardened.
584+ * `added` is an aggregate option that is currently equivalent to
585+ `committed,index`. This mode sacrifices additional performance to
586+ ensure that the results of commands like `git add` and similar operations
587+ are hardened.
588+ * `all` is an aggregate option that syncs all individual components above.
589+
590+ core.fsyncMethod::
591+ A value indicating the strategy Git will use to harden repository data
592+ using fsync and related primitives.
593+ +
594+ * `fsync` uses the fsync() system call or platform equivalents.
595+ * `writeout-only` issues pagecache writeback requests, but depending on the
596+ filesystem and storage hardware, data added to the repository may not be
597+ durable in the event of a system crash. This is the default mode on macOS.
598+
550599core.fsyncObjectFiles::
551600 This boolean will enable 'fsync()' when writing object files.
601+ This setting is deprecated. Use core.fsync instead.
552602+
553- This is a total waste of time and effort on a filesystem that orders
554- data writes properly, but can be useful for filesystems that do not use
555- journalling (traditional UNIX filesystems) or that only journal metadata
556- and not file contents (OS X's HFS+, or Linux ext3 with "data=writeback") .
603+ This setting affects data added to the Git repository in loose-object
604+ form. When set to true, Git will issue an fsync or similar system call
605+ to flush caches so that loose-objects remain consistent in the face
606+ of a unclean system shutdown .
557607
558608core.preloadIndex::
559609 Enable parallel index preload for operations like 'git diff'
0 commit comments