git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: John Cai <johncai86@gmail.com>
Subject: [PATCH v3 0/4] document fsck error message ids
Date: Tue, 25 Oct 2022 15:42:20 -0700	[thread overview]
Message-ID: <20221025224224.2352979-1-gitster@pobox.com> (raw)
In-Reply-To: <pull.1369.v2.git.git.1666667864.gitgitgadget@gmail.com>

"git fsck" reports various anomalies it finds in the form of message
tokens, like `badDate`, in its error message, and allows most of
them to be tweaked for their severity levels via configuration
varialbes, like `fsck.badDate`.  We however do not have them
centrally documented anywhere, other than the header file itself
(and the header file does not have explanation on what they mean).

This is John's work, with a bit of help from me.

 * Patches 1 and 2 remove fsck error message IDs from fsck.h that
   are not used in today's code.

 * In patch 3, "git fsck --help" gains a section that lists all the
   fsck error message ids with explanation.  "git config --help"
   gains a reference to the section.

 * While we worked on patch 3, we made many small mistakes (like
   spelling the tokens with incorrect camelCasing, or failing to
   list a few messages), which revealed the need of automated tool
   to catch them.  Patch 4 adds to "make check-docs" a mechanism to
   verify the documentation covers what is defined in fsck.h
   correctly.

Possible future directions that are left outside the scope of this
topic are:

 * "git config --help" may want to include the same list inline
   instead of having a reference to "git fsck --help".

 * Instead of the lint-docs support, we may want to auto-generate
   the documentation from fsck.h.


John Cai (2):
  fsck: remove the unused BAD_TAG_OBJECT
  fsck: document msg-id

Junio C Hamano (2):
  fsck: remove the unused MISSING_TREE_OBJECT
  Documentation: add lint-fsck-msgids

 Documentation/Makefile              |  11 ++
 Documentation/config/fsck.txt       |   4 +
 Documentation/fsck-msgids.txt       | 161 ++++++++++++++++++++++++++++
 Documentation/git-fsck.txt          |  12 +++
 Documentation/lint-fsck-msgids.perl |  70 ++++++++++++
 fsck.h                              |   8 +-
 6 files changed, 264 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/fsck-msgids.txt
 create mode 100755 Documentation/lint-fsck-msgids.perl

-- 
2.38.1-359-g84c4c6d5a5


  parent reply	other threads:[~2022-10-25 22:42 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24 15:00 [PATCH 0/2] Document fsck msg ids John Cai via GitGitGadget
2022-10-24 15:00 ` [PATCH 1/2] fsck: remove the unused BAD_TAG_OBJECT John Cai via GitGitGadget
2022-10-24 16:57   ` Junio C Hamano
2022-10-24 18:16     ` Junio C Hamano
2022-10-24 18:33       ` John Cai
2022-10-24 23:39         ` Jeff King
2022-10-24 15:00 ` [PATCH 2/2] fsck: document msg-id John Cai via GitGitGadget
2022-10-24 17:33   ` Junio C Hamano
2022-10-25  9:41     ` Ævar Arnfjörð Bjarmason
2022-10-25 16:07       ` Junio C Hamano
2022-10-24 18:51 ` [PATCH 0/2] Document fsck msg ids Junio C Hamano
2022-10-25  3:17 ` [PATCH v2 " John Cai via GitGitGadget
2022-10-25  3:17   ` [PATCH v2 1/2] fsck: remove the unused BAD_TAG_OBJECT John Cai via GitGitGadget
2022-10-25  3:17   ` [PATCH v2 2/2] fsck: document msg-id John Cai via GitGitGadget
2022-10-25  4:30   ` [PATCH v2 0/2] Document fsck msg ids Junio C Hamano
2022-10-25  4:40     ` Junio C Hamano
2022-10-25  5:12     ` [PATCH] Documentation: add lint-fsck-msgids Junio C Hamano
2022-10-25 22:42   ` Junio C Hamano [this message]
2022-10-25 22:42     ` [PATCH v3 1/4] fsck: remove the unused BAD_TAG_OBJECT Junio C Hamano
2022-10-25 22:42     ` [PATCH v3 2/4] fsck: remove the unused MISSING_TREE_OBJECT Junio C Hamano
2022-10-25 22:42     ` [PATCH v3 3/4] fsck: document msg-id Junio C Hamano
2022-10-25 22:42     ` [PATCH v3 4/4] Documentation: add lint-fsck-msgids Junio C Hamano
2022-10-26  2:43       ` Ævar Arnfjörð Bjarmason
2022-10-26  5:34         ` Jeff King
2022-10-26  6:46           ` Junio C Hamano
2022-10-26 11:35           ` Ævar Arnfjörð Bjarmason
2022-10-28  1:23             ` Jeff King
2022-10-28  2:04               ` Ævar Arnfjörð Bjarmason
2022-10-28  5:32                 ` Jeff King
2022-10-28 10:41                   ` Ævar Arnfjörð Bjarmason
2022-10-28  3:02             ` John Cai
2022-10-28  3:11               ` Ævar Arnfjörð Bjarmason
2022-10-28  5:32                 ` Junio C Hamano
2022-10-28  5:37                   ` Jeff King
2022-10-28  5:35                 ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221025224224.2352979-1-gitster@pobox.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=johncai86@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).