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>
This commit is contained in:
Ævar Arnfjörð Bjarmason 2018-07-27 14:37:13 +00:00 committed by Junio C Hamano
parent 5180dd2e9f
commit b2558abdc4

View File

@ -1595,15 +1595,30 @@ filter.<driver>.smudge::
linkgit:gitattributes[5] for details.
fsck.<msg-id>::
Allows overriding the message type (error, warn or ignore) of a
specific message ID such as `missingEmail`.
During fsck git may find issues with legacy data which
wouldn't be generated by current versions of git, and which
wouldn't be sent over the wire if `transfer.fsckObjects` was
set. This feature is intended to support working with legacy
repositories containing such data.
+
For convenience, fsck prefixes the error/warning with the message ID,
e.g. "missingEmail: invalid author/committer line - missing email" means
that setting `fsck.missingEmail = ignore` will hide that issue.
Setting `fsck.<msg-id>` will be picked up by linkgit:git-fsck[1], but
to accept pushes of such data set `receive.fsck.<msg-id>` instead.
+
This feature is intended to support working with legacy repositories
which cannot be repaired without disruptive changes.
The rest of the documentation discusses `fsck.*` for brevity, but the
same applies for the corresponding `receive.fsck.*` variables.
+
When `fsck.<msg-id>` is set, errors can be switched to warnings and
vice versa by configuring the `fsck.<msg-id>` setting where the
`<msg-id>` is the fsck message ID and the value is one of `error`,
`warn` or `ignore`. For convenience, fsck prefixes the error/warning
with the message ID, e.g. "missingEmail: invalid author/committer line
- missing email" means that setting `fsck.missingEmail = ignore` will
hide that issue.
+
In general, it is better to enumerate existing objects with problems
with `fsck.skipList`, instead of listing the kind of breakages these
problematic objects share to be ignored, as doing the latter will
allow new instances of the same breakages go unnoticed.
fsck.skipList::
The path to a sorted list of object names (i.e. one SHA-1 per
@ -1612,6 +1627,9 @@ fsck.skipList::
should be accepted despite early commits containing errors that
can be safely ignored such as invalid committer email addresses.
Note: corrupt objects cannot be skipped with this setting.
+
Like `fsck.<msg-id>` this variable has a corresponding
`receive.fsck.skipList` variant.
gc.aggressiveDepth::
The depth parameter used in the delta compression
@ -2893,26 +2911,16 @@ receive.fsckObjects::
`transfer.fsckObjects` is used instead.
receive.fsck.<msg-id>::
When `receive.fsckObjects` is set to true, errors can be switched
to warnings and vice versa by configuring the `receive.fsck.<msg-id>`
setting where the `<msg-id>` is the fsck message ID and the value
is one of `error`, `warn` or `ignore`. For convenience, fsck prefixes
the error/warning with the message ID, e.g. "missingEmail: invalid
author/committer line - missing email" means that setting
`receive.fsck.missingEmail = ignore` will hide that issue.
+
This feature is intended to support working with legacy repositories
which would not pass pushing when `receive.fsckObjects = true`, allowing
the host to accept repositories with certain known issues but still catch
other issues.
Acts like `fsck.<msg-id>`, but is used by
linkgit:git-receive-pack[1] instead of
linkgit:git-fsck[1]. See the `fsck.<msg-id>` documentation for
details.
receive.fsck.skipList::
The path to a sorted list of object names (i.e. one SHA-1 per
line) that are known to be broken in a non-fatal way and should
be ignored. This feature is useful when an established project
should be accepted despite early commits containing errors that
can be safely ignored such as invalid committer email addresses.
Note: corrupt objects cannot be skipped with this setting.
Acts like `fsck.skipList`, but is used by
linkgit:git-receive-pack[1] instead of
linkgit:git-fsck[1]. See the `fsck.skipList` documentation for
details.
receive.keepAlive::
After receiving the pack from the client, `receive-pack` may