Files
git/Documentation/fsck-msgids.adoc
shejialuo 784ceccb91 packed-backend: fsck should warn when "packed-refs" file is empty
We assume the "packed-refs" won't be empty and instead has at least one
line in it (even when there are no refs packed, there is the file header
line). Because there is no terminating LF in the empty file, we will
report "packedRefEntryNotTerminated(ERROR)" to the user.

However, the runtime code paths would accept an empty "packed-refs"
file, for example, "create_snapshot" would simply return the "snapshot"
without checking the content of "packed-refs". So, we should skip
checking the content of "packed-refs" when it is empty during fsck.

After 694b7a1999 (repack_without_ref(): write peeled refs in the
rewritten file, 2013-04-22), we would always write a header into the
"packed-refs" file. So, versions of Git that are not too ancient never
write such an empty "packed-refs" file.

As an empty file often indicates a sign of a filesystem-level issue, the
way we want to resolve this inconsistency is not make everybody totally
silent but notice and report the anomaly.

Let's create a "FSCK_INFO" message id "EMPTY_PACKED_REFS_FILE" to report
to the users that "packed-refs" is empty.

Signed-off-by: shejialuo <shejialuo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-05-14 12:32:58 -07:00

242 lines
6.2 KiB
Plaintext

`badDate`::
(ERROR) Invalid date format in an author/committer line.
`badDateOverflow`::
(ERROR) Invalid date value in an author/committer line.
`badEmail`::
(ERROR) Invalid email format in an author/committer line.
`badFilemode`::
(INFO) A tree contains a bad filemode entry.
`badName`::
(ERROR) An author/committer name is empty.
`badObjectSha1`::
(ERROR) An object has a bad sha1.
`badPackedRefEntry`::
(ERROR) The "packed-refs" file contains an invalid entry.
`badPackedRefHeader`::
(ERROR) The "packed-refs" file contains an invalid
header.
`badParentSha1`::
(ERROR) A commit object has a bad parent sha1.
`badRefContent`::
(ERROR) A ref has bad content.
`badRefFiletype`::
(ERROR) A ref has a bad file type.
`badRefName`::
(ERROR) A ref has an invalid format.
`badReferentName`::
(ERROR) The referent name of a symref is invalid.
`badTagName`::
(INFO) A tag has an invalid format.
`badTimezone`::
(ERROR) Found an invalid time zone in an author/committer line.
`badTree`::
(ERROR) A tree cannot be parsed.
`badTreeSha1`::
(ERROR) A tree has an invalid format.
`badType`::
(ERROR) Found an invalid object type.
`duplicateEntries`::
(ERROR) A tree contains duplicate file entries.
`emptyName`::
(WARN) A path contains an empty name.
`emptyPackedRefsFile`::
(INFO) "packed-refs" file is empty. Report to the
git@vger.kernel.org mailing list if you see this error. As only
very early versions of Git would create such an empty
"packed_refs" file, we might tighten this rule in the future.
`extraHeaderEntry`::
(IGNORE) Extra headers found after `tagger`.
`fullPathname`::
(WARN) A path contains the full path starting with "/".
`gitattributesBlob`::
(ERROR) A non-blob found at `.gitattributes`.
`gitattributesLarge`::
(ERROR) The `.gitattributes` blob is too large.
`gitattributesLineLength`::
(ERROR) The `.gitattributes` blob contains too long lines.
`gitattributesMissing`::
(ERROR) Unable to read `.gitattributes` blob.
`gitattributesSymlink`::
(INFO) `.gitattributes` is a symlink.
`gitignoreSymlink`::
(INFO) `.gitignore` is a symlink.
`gitmodulesBlob`::
(ERROR) A non-blob found at `.gitmodules`.
`gitmodulesLarge`::
(ERROR) The `.gitmodules` file is too large to parse.
`gitmodulesMissing`::
(ERROR) Unable to read `.gitmodules` blob.
`gitmodulesName`::
(ERROR) A submodule name is invalid.
`gitmodulesParse`::
(INFO) Could not parse `.gitmodules` blob.
`gitmodulesLarge`;
(ERROR) `.gitmodules` blob is too large to parse.
`gitmodulesPath`::
(ERROR) `.gitmodules` path is invalid.
`gitmodulesSymlink`::
(ERROR) `.gitmodules` is a symlink.
`gitmodulesUpdate`::
(ERROR) Found an invalid submodule update setting.
`gitmodulesUrl`::
(ERROR) Found an invalid submodule url.
`hasDot`::
(WARN) A tree contains an entry named `.`.
`hasDotdot`::
(WARN) A tree contains an entry named `..`.
`hasDotgit`::
(WARN) A tree contains an entry named `.git`.
`largePathname`::
(WARN) A tree contains an entry with a very long path name. If
the value of `fsck.largePathname` contains a colon, that value
is used as the maximum allowable length (e.g., "warn:10" would
complain about any path component of 11 or more bytes). The
default value is 4096.
`mailmapSymlink`::
(INFO) `.mailmap` is a symlink.
`missingAuthor`::
(ERROR) Author is missing.
`missingCommitter`::
(ERROR) Committer is missing.
`missingEmail`::
(ERROR) Email is missing in an author/committer line.
`missingNameBeforeEmail`::
(ERROR) Missing name before an email in an author/committer line.
`missingObject`::
(ERROR) Missing `object` line in tag object.
`missingSpaceBeforeDate`::
(ERROR) Missing space before date in an author/committer line.
`missingSpaceBeforeEmail`::
(ERROR) Missing space before the email in an author/committer line.
`missingTag`::
(ERROR) Unexpected end after `type` line in a tag object.
`missingTagEntry`::
(ERROR) Missing `tag` line in a tag object.
`missingTaggerEntry`::
(INFO) Missing `tagger` line in a tag object.
`missingTree`::
(ERROR) Missing `tree` line in a commit object.
`missingType`::
(ERROR) Invalid type value on the `type` line in a tag object.
`missingTypeEntry`::
(ERROR) Missing `type` line in a tag object.
`multipleAuthors`::
(ERROR) Multiple author lines found in a commit.
`nulInCommit`::
(WARN) Found a NUL byte in the commit object body.
`nulInHeader`::
(FATAL) NUL byte exists in the object header.
`nullSha1`::
(WARN) Tree contains entries pointing to a null sha1.
`packedRefEntryNotTerminated`::
(ERROR) The "packed-refs" file contains an entry that is
not terminated by a newline.
`packedRefUnsorted`::
(ERROR) The "packed-refs" file is not sorted.
`refMissingNewline`::
(INFO) A loose ref that does not end with newline(LF). As
valid implementations of Git never created such a loose ref
file, it may become an error in the future. Report to the
git@vger.kernel.org mailing list if you see this error, as
we need to know what tools created such a file.
`symlinkRef`::
(INFO) A symbolic link is used as a symref. Report to the
git@vger.kernel.org mailing list if you see this error, as we
are assessing the feasibility of dropping the support to drop
creating symbolic links as symrefs.
`symrefTargetIsNotARef`::
(INFO) The target of a symbolic reference points neither to
a root reference nor to a reference starting with "refs/".
Although we allow create a symref pointing to the referent which
is outside the "ref" by using `git symbolic-ref`, we may tighten
the rule in the future. Report to the git@vger.kernel.org
mailing list if you see this error, as we need to know what tools
created such a file.
`trailingRefContent`::
(INFO) A loose ref has trailing content. As valid implementations
of Git never created such a loose ref file, it may become an
error in the future. Report to the git@vger.kernel.org mailing
list if you see this error, as we need to know what tools
created such a file.
`treeNotSorted`::
(ERROR) A tree is not properly sorted.
`unknownType`::
(ERROR) Found an unknown object type.
`unterminatedHeader`::
(FATAL) Missing end-of-line in the object header.
`zeroPaddedDate`::
(ERROR) Found a zero padded date in an author/committer line.
`zeroPaddedFilemode`::
(WARN) Found a zero padded filemode in a tree.