Provide a function to parse an fsck message IDs

This function will be used in the next commits to allow the user to
ask fsck to handle specific problems differently, e.g. demoting certain
errors to warnings.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Offer a function to switch fsck errors to warnings and vice versa

Unfortunately, the FSCK_WARN/FSCK_ERROR flag is only really heeded by
git fsck, but other call paths (e.g. git index-pack --strict) error
out *always* no matter what type was specified. Therefore, we need
to take extra care to default to all FSCK_ERROR in those cases.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Allow demoting errors to warnings via receive.fsckobjects

The value can now be a list of options of the form '-missing_email'.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
fsck: report the ID of the error/warning

Some legacy code has objects with non-fatal fsck issues; To enable the
user to ignore those issues, let's print out the ID (e.g. when
encountering MISSING_EMAIL, the user might want to call `git config
fsck.receive.MISSING_EMAIL ignore`).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Make fsck_ident() warn-friendly

When fsck_ident() identifies a problem with the ident, it should still
advance the pointer to the next line so that fsck can continue in the
case of a mere warning.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Make fsck_commit() warn-friendly

When fsck_commit() identifies a problem with the commit, it should try
to make it possible to continue checking the commit object, in case the
user wants to demote the detected errors to mere warnings.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
fsck: handle multiple authors in commits specially

This problem has been detected in the wild, and is the primary reason
to introduce an option to demote certain fsck errors to warnings. Let's
offer to ignore this particular problem specifically.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Make fsck_tag() warn-friendly

When fsck_tag() identifies a problem with the commit, it should try
to make it possible to continue checking the commit object, in case the
user wants to demote the detected errors to mere warnings.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add a simple test for fsck.receive.*

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Disallow demoting grave fsck errors to warnings

Some kinds of errors are intrinsically unrecoverable (e.g. errors while
uncompressing objects). It does not make sense to allow demoting them to
mere warnings.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Optionally ignore specific fsck issues completely
Document the new options for receive.fsckobjects

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
TODO: squash! Document the new options for receive.fsckobjects

document fsck.receive.* options
fsck: allow upgrading fsck warnings to errors

The 'invalid tag name' and 'missing tagger entry' warnings can now be
upgraded to errors by setting receive.fsckobjects to

	+invalid-tag-name,+missing-tagger-entry

Incidentally, the missing tagger warning is now really shown as a warning
(as opposed to being reported with the "error:" prefix, as it used to be
the case before this commit).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>