config doc: unify the description of fsck.* and receive.fsck.*

The documentation for the fsck.<msg-id> and receive.fsck.<msg-id> variables was mostly duplicated in two places, with fsck.<msg-id> making no mention of the corresponding receive.fsck.<msg-id>, and the same for fsck.skipList. I spent quite a lot of time today wondering why setting the fsck.<msg-id> variant wasn't working to clone a legacy repository (not that that would have worked anyway, but a subsequent patch implements fetch.fsck.<msg-id>). Rectify this situation by describing the feature in general terms under the fsck.* documentation, and make the receive.fsck.* documentation refer to those variables instead. This documentation was initially added in 2becf00ff7 ("fsck: support demoting errors to warnings", 2015-06-22) and 4b55b9b479 ("fsck: document the new receive.fsck.<msg-id> options", 2015-06-22). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Jul 27, 2018 at 14:37 UTC b2558abdc471758ae8b30c1198e833a7a1c6616c
1 file changed +35 -27
Documentation/config.txt
+35 -27
@@ -1595,15 +1595,30 @@ filter.<driver>.smudge::
1595 linkgit:gitattributes[5] for details.
1596
1597 fsck.<msg-id>::
1598 - Allows overriding the message type (error, warn or ignore) of a
1599 - specific message ID such as `missingEmail`.
1600 -+
1601 -For convenience, fsck prefixes the error/warning with the message ID,
1602 -e.g. "missingEmail: invalid author/committer line - missing email" means
1603 -that setting `fsck.missingEmail = ignore` will hide that issue.
1604 -+
1605 -This feature is intended to support working with legacy repositories
1606 -which cannot be repaired without disruptive changes.
1598 + During fsck git may find issues with legacy data which
1599 + wouldn't be generated by current versions of git, and which
1600 + wouldn't be sent over the wire if `transfer.fsckObjects` was
1601 + set. This feature is intended to support working with legacy
1602 + repositories containing such data.
1603 ++
1604 +Setting `fsck.<msg-id>` will be picked up by linkgit:git-fsck[1], but
1605 +to accept pushes of such data set `receive.fsck.<msg-id>` instead.
1606 ++
1607 +The rest of the documentation discusses `fsck.*` for brevity, but the
1608 +same applies for the corresponding `receive.fsck.*` variables.
1609 ++
1610 +When `fsck.<msg-id>` is set, errors can be switched to warnings and
1611 +vice versa by configuring the `fsck.<msg-id>` setting where the
1612 +`<msg-id>` is the fsck message ID and the value is one of `error`,
1613 +`warn` or `ignore`. For convenience, fsck prefixes the error/warning
1614 +with the message ID, e.g. "missingEmail: invalid author/committer line
1615 +- missing email" means that setting `fsck.missingEmail = ignore` will
1616 +hide that issue.
1617 ++
1618 +In general, it is better to enumerate existing objects with problems
1619 +with `fsck.skipList`, instead of listing the kind of breakages these
1620 +problematic objects share to be ignored, as doing the latter will
1621 +allow new instances of the same breakages go unnoticed.
1622
1623 fsck.skipList::
1624 The path to a sorted list of object names (i.e. one SHA-1 per
@@ -1612,6 +1627,9 @@ fsck.skipList::
1627 should be accepted despite early commits containing errors that
1628 can be safely ignored such as invalid committer email addresses.
1629 Note: corrupt objects cannot be skipped with this setting.
1630 ++
1631 +Like `fsck.<msg-id>` this variable has a corresponding
1632 +`receive.fsck.skipList` variant.
1633
1634 gc.aggressiveDepth::
1635 The depth parameter used in the delta compression
@@ -2893,26 +2911,16 @@ receive.fsckObjects::
2911 `transfer.fsckObjects` is used instead.
2912
2913 receive.fsck.<msg-id>::
2896 - When `receive.fsckObjects` is set to true, errors can be switched
2897 - to warnings and vice versa by configuring the `receive.fsck.<msg-id>`
2898 - setting where the `<msg-id>` is the fsck message ID and the value
2899 - is one of `error`, `warn` or `ignore`. For convenience, fsck prefixes
2900 - the error/warning with the message ID, e.g. "missingEmail: invalid
2901 - author/committer line - missing email" means that setting
2902 - `receive.fsck.missingEmail = ignore` will hide that issue.
2903 -+
2904 -This feature is intended to support working with legacy repositories
2905 -which would not pass pushing when `receive.fsckObjects = true`, allowing
2906 -the host to accept repositories with certain known issues but still catch
2907 -other issues.
2914 + Acts like `fsck.<msg-id>`, but is used by
2915 + linkgit:git-receive-pack[1] instead of
2916 + linkgit:git-fsck[1]. See the `fsck.<msg-id>` documentation for
2917 + details.
2918
2919 receive.fsck.skipList::
2910 - The path to a sorted list of object names (i.e. one SHA-1 per
2911 - line) that are known to be broken in a non-fatal way and should
2912 - be ignored. This feature is useful when an established project
2913 - should be accepted despite early commits containing errors that
2914 - can be safely ignored such as invalid committer email addresses.
2915 - Note: corrupt objects cannot be skipped with this setting.
2920 + Acts like `fsck.skipList`, but is used by
2921 + linkgit:git-receive-pack[1] instead of
2922 + linkgit:git-fsck[1]. See the `fsck.skipList` documentation for
2923 + details.
2924
2925 receive.keepAlive::
2926 After receiving the pack from the client, `receive-pack` may