Top Description Inners Fields Constructors Methods
org.eclipse.jgit.lib

public Class ObjectChecker

extends Object
Class Inheritance
Static Imports
org.eclipse.jgit.lib.Constants.DOT_GIT_MODULES, .Constants.OBJECT_ID_LENGTH, .Constants.OBJECT_ID_STRING_LENGTH, .Constants.OBJ_BAD, .Constants.OBJ_BLOB, .Constants.OBJ_COMMIT, .Constants.OBJ_TAG, .Constants.OBJ_TREE, .ObjectChecker.ErrorType.BAD_DATE, .ObjectChecker.ErrorType.BAD_EMAIL, .ObjectChecker.ErrorType.BAD_OBJECT_SHA1, .ObjectChecker.ErrorType.BAD_PARENT_SHA1, .ObjectChecker.ErrorType.BAD_TIMEZONE, .ObjectChecker.ErrorType.BAD_TREE_SHA1, .ObjectChecker.ErrorType.BAD_UTF8, .ObjectChecker.ErrorType.DUPLICATE_ENTRIES, .ObjectChecker.ErrorType.EMPTY_NAME, .ObjectChecker.ErrorType.FULL_PATHNAME, .ObjectChecker.ErrorType.HAS_DOT, .ObjectChecker.ErrorType.HAS_DOTDOT, .ObjectChecker.ErrorType.HAS_DOTGIT, .ObjectChecker.ErrorType.MISSING_AUTHOR, .ObjectChecker.ErrorType.MISSING_COMMITTER, .ObjectChecker.ErrorType.MISSING_EMAIL, .ObjectChecker.ErrorType.MISSING_OBJECT, .ObjectChecker.ErrorType.MISSING_SPACE_BEFORE_DATE, .ObjectChecker.ErrorType.MISSING_TAG_ENTRY, .ObjectChecker.ErrorType.MISSING_TREE, .ObjectChecker.ErrorType.MISSING_TYPE_ENTRY, .ObjectChecker.ErrorType.NULL_SHA1, .ObjectChecker.ErrorType.TREE_NOT_SORTED, .ObjectChecker.ErrorType.UNKNOWN_TYPE, .ObjectChecker.ErrorType.WIN32_BAD_NAME, .ObjectChecker.ErrorType.ZERO_PADDED_FILEMODE, org.eclipse.jgit.util.Paths.compare, .Paths.compareSameName, .RawParseUtils.nextLF, .RawParseUtils.parseBase10

Verifies that an object is formatted correctly.

Verifications made by this class only check that the fields of an object are formatted correctly. The ObjectId checksum of the object is not verified, and connectivity links between objects are also not verified. Its assumed that the caller can provide both of these validations on its own.

Instances of this class are not thread safe, but they may be reused to perform multiple object validations, calling reset() between them to clear the internal state (e.g. getGitsubmodules())

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
ObjectChecker.ErrorType

Potential issues identified by the checker.

Field Summary

Modifier and TypeField and Description
private boolean
public static final byte[]
author

Header "author "

private final MutableInteger
public static final byte[]
committer

Header "committer "

private static final byte[]
dotGitmodules

Path ".gitmodules"

public static final byte[]
encoding

Header "encoding "

private EnumSet<ObjectChecker.ErrorType>
private final List<GitmoduleEntry>
private boolean
public static final byte[]
object

Header "object "

public static final byte[]
parent

Header "parent "

private ObjectIdSet
public static final byte[]
tag

Header "tag "

public static final byte[]
tagger

Header "tagger "

private final MutableObjectId
public static final byte[]
tree

Header "tree "

public static final byte[]
type

Header "type "

private boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
check(int
type of the object. Must be a valid object type code in org.eclipse.jgit.lib.Constants.
objType
,
byte[]
the raw data which comprises the object. This should be in the canonical format (that is the format used to generate the ObjectId of the object). The array is never modified.
raw
)

Check an object for parsing errors.

public void
check(AnyObjectId
identify of the object being checked.
id
,
int
type of the object. Must be a valid object type code in org.eclipse.jgit.lib.Constants.
objType
,
byte[]
the raw data which comprises the object. This should be in the canonical format (that is the format used to generate the ObjectId of the object). The array is never modified.
raw
)

Check an object for parsing errors.

public void
checkBlob(byte[]
the blob data. The array is never modified.
raw
)

Check a blob for errors.

public void
checkCommit(byte[]
the commit data. The array is never modified.
raw
)

Check a commit for errors.

public void
checkCommit(AnyObjectId
identity of the object being checked.
id
,
byte[]
the commit data. The array is never modified.
raw
)

Check a commit for errors.

private boolean
checkId(byte[] raw)

private void
checkNotWindowsDevice(byte[] raw, int ptr, int end, AnyObjectId id)

public void
checkPath(String
path string to scan.
path
)

Check tree path entry for validity.

public void
checkPath(byte[]
buffer to scan.
raw
,
int
offset to first byte of the name.
ptr
,
int
offset to one past last byte of name.
end
)

Check tree path entry for validity.

public void
checkPathSegment(byte[]
buffer to scan.
raw
,
int
offset to first byte of the name.
ptr
,
int
offset to one past last byte of name.
end
)

Check tree path entry for validity.

private void
checkPathSegment2(byte[] raw, int ptr, int end, AnyObjectId id)

private void
checkPersonIdent(byte[] raw, AnyObjectId id)

public void
checkTag(byte[]
the tag data. The array is never modified.
raw
)

Check an annotated tag for errors.

public void
checkTag(AnyObjectId
identity of the object being checked.
id
,
byte[]
the tag data. The array is never modified.
raw
)

Check an annotated tag for errors.

public void
checkTree(byte[]
the raw tree data. The array is never modified.
raw
)

Check a canonical formatted tree for errors.

public void
checkTree(AnyObjectId
identity of the object being checked.
id
,
byte[]
the raw tree data. The array is never modified.
raw
)

Check a canonical formatted tree for errors.

private boolean
checkTruncatedIgnorableUTF8(byte[] raw, int ptr, int end, AnyObjectId id)

private static boolean
duplicateName(final byte[] raw, final int thisNamePos, final int thisNameEnd)

public List<GitmoduleEntry>

Returns:

List of pairs of ids <tree, blob>.
getGitsubmodules
()

Get the list of ".gitmodules" files found in the pack.

private ObjectId
idFor(int objType, byte[] raw)

private static boolean
isGit(byte[] buf, int p)

private boolean

Returns:

true if the filename in buf could be a ".gitmodules" file
isGitmodules
(byte[]
byte array to decode
buf
,
int
position where a supposed filename is starting
start
,
int
position where a supposed filename is ending
end
,
AnyObjectId
object id for error reporting
id
)

Check if the filename contained in buf[start:end] could be read as a .gitmodules file when checked out to the working directory.

private static boolean
isGitTilde1(byte[] buf, int p, int end)

private static boolean
private boolean
isMacHFSGit(byte[] raw, int ptr, int end, AnyObjectId id)

private boolean
isMacHFSGitmodules(byte[] raw, int ptr, int end, AnyObjectId id)

private boolean
isMacHFSPath(byte[] raw, int ptr, int end, byte[] path, AnyObjectId id)

private static boolean
isNormalizedGit(byte[] raw, int ptr, int end)

private boolean
isNTFSGitmodules(byte[] buf, int start, int end)

private static boolean
private boolean
match(byte[] b, byte[] src)

private boolean
matchLowerCase(byte[] b, int ptr, byte[] src)

public BlobObjectChecker

Returns:

new BlobObjectChecker or null if it's not provided.
newBlobObjectChecker
()

Create a new org.eclipse.jgit.lib.BlobObjectChecker.

private String
normalize(byte[] raw, int ptr, int end)

private void
public void
reset()

Reset the invocation-specific state from this instance.

private int
scanPathSegment(byte[] raw, int ptr, int end, AnyObjectId id)

public ObjectChecker

Returns:

this.
setAllowInvalidPersonIdent
(boolean
if true accept invalid person identity strings.
allow
)

Enable accepting invalid author, committer and tagger identities.

public ObjectChecker

Returns:

this.
setAllowLeadingZeroFileMode
(boolean
allow leading zero mode.
allow
)

Enable accepting leading zero mode in tree entries.

public ObjectChecker

Returns:

this
setIgnore
(Set<ObjectChecker.ErrorType>
error types to ignore. The caller's set is copied.
ids
)

Configure error types to be ignored across all objects.

public ObjectChecker

Returns:

this
setIgnore
(ObjectChecker.ErrorType
error type to ignore.
id
,
boolean
true to ignore this error; false to treat the error as an error and throw.
ignore
)

Add message type to be ignored across all objects.

public ObjectChecker

Returns:

this.
setSafeForMacOS
(boolean
true if Mac OS X name checking should be performed.
mac
)

Restrict trees to only names legal on Mac OS X platforms.

public ObjectChecker

Returns:

this.
setSafeForWindows
(boolean
true if Windows name checking should be performed.
win
)

Restrict trees to only names legal on Windows platforms.

public ObjectChecker

Returns:

this
setSkipList
(ObjectIdSet
collection of object names known to be broken in a non-fatal way that should be ignored by the checker.
objects
)

Enable accepting specific malformed (but not horribly broken) objects.

private static String
toHexString(byte[] raw, int ptr, int end)

private static char
toLower(byte b)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

allowInvalidPersonIdentback to summary
private boolean allowInvalidPersonIdent
authorback to summary
public static final byte[] author

Header "author "

bufPtrback to summary
private final MutableInteger bufPtr
committerback to summary
public static final byte[] committer

Header "committer "

dotGitmodulesback to summary
private static final byte[] dotGitmodules

Path ".gitmodules"

encodingback to summary
public static final byte[] encoding

Header "encoding "

errorsback to summary
private EnumSet<ObjectChecker.ErrorType> errors
gitsubmodulesback to summary
private final List<GitmoduleEntry> gitsubmodules
macosxback to summary
private boolean macosx
objectback to summary
public static final byte[] object

Header "object "

parentback to summary
public static final byte[] parent

Header "parent "

skipListback to summary
private ObjectIdSet skipList
tagback to summary
public static final byte[] tag

Header "tag "

taggerback to summary
public static final byte[] tagger

Header "tagger "

tempIdback to summary
private final MutableObjectId tempId
treeback to summary
public static final byte[] tree

Header "tree "

typeback to summary
public static final byte[] type

Header "type "

windowsback to summary
private boolean windows

Constructor Detail

ObjectCheckerback to summary
public ObjectChecker()

Method Detail

checkback to summary
public void check(int objType, byte[] raw) throws CorruptObjectException

Check an object for parsing errors.

Parameters
objType:int

type of the object. Must be a valid object type code in org.eclipse.jgit.lib.Constants.

raw:byte[]

the raw data which comprises the object. This should be in the canonical format (that is the format used to generate the ObjectId of the object). The array is never modified.

Exceptions
CorruptObjectException:
if an error is identified.
checkback to summary
public void check(AnyObjectId id, int objType, byte[] raw) throws CorruptObjectException

Check an object for parsing errors.

Parameters
id:AnyObjectId

identify of the object being checked.

objType:int

type of the object. Must be a valid object type code in org.eclipse.jgit.lib.Constants.

raw:byte[]

the raw data which comprises the object. This should be in the canonical format (that is the format used to generate the ObjectId of the object). The array is never modified.

Exceptions
CorruptObjectException:
if an error is identified.
Since
4.2
checkBlobback to summary
public void checkBlob(byte[] raw) throws CorruptObjectException

Check a blob for errors.

This may not be called from PackParser in some cases. Use newBlobObjectChecker instead.

Parameters
raw:byte[]

the blob data. The array is never modified.

Exceptions
CorruptObjectException:
if any error was detected.
checkCommitback to summary
public void checkCommit(byte[] raw) throws CorruptObjectException

Check a commit for errors.

Parameters
raw:byte[]

the commit data. The array is never modified.

Exceptions
CorruptObjectException:
if any error was detected.
checkCommitback to summary
public void checkCommit(AnyObjectId id, byte[] raw) throws CorruptObjectException

Check a commit for errors.

Parameters
id:AnyObjectId

identity of the object being checked.

raw:byte[]

the commit data. The array is never modified.

Exceptions
CorruptObjectException:
if any error was detected.
Since
4.2
checkIdback to summary
private boolean checkId(byte[] raw)
checkNotWindowsDeviceback to summary
private void checkNotWindowsDevice(byte[] raw, int ptr, int end, AnyObjectId id) throws CorruptObjectException
checkPathback to summary
public void checkPath(String path) throws CorruptObjectException

Check tree path entry for validity.

Unlike checkPathSegment(byte[], int, int), this version scans a multi-directory path string such as "src/main.c".

Parameters
path:String

path string to scan.

Exceptions
CorruptObjectException:
path is invalid.
Since
3.6
checkPathback to summary
public void checkPath(byte[] raw, int ptr, int end) throws CorruptObjectException

Check tree path entry for validity.

Unlike checkPathSegment(byte[], int, int), this version scans a multi-directory path string such as "src/main.c".

Parameters
raw:byte[]

buffer to scan.

ptr:int

offset to first byte of the name.

end:int

offset to one past last byte of name.

Exceptions
CorruptObjectException:
path is invalid.
Since
3.6
checkPathSegmentback to summary
public void checkPathSegment(byte[] raw, int ptr, int end) throws CorruptObjectException

Check tree path entry for validity.

Parameters
raw:byte[]

buffer to scan.

ptr:int

offset to first byte of the name.

end:int

offset to one past last byte of name.

Exceptions
CorruptObjectException:
name is invalid.
Since
3.4
checkPathSegment2back to summary
private void checkPathSegment2(byte[] raw, int ptr, int end, AnyObjectId id) throws CorruptObjectException
checkPersonIdentback to summary
private void checkPersonIdent(byte[] raw, AnyObjectId id) throws CorruptObjectException
checkTagback to summary
public void checkTag(byte[] raw) throws CorruptObjectException

Check an annotated tag for errors.

Parameters
raw:byte[]

the tag data. The array is never modified.

Exceptions
CorruptObjectException:
if any error was detected.
checkTagback to summary
public void checkTag(AnyObjectId id, byte[] raw) throws CorruptObjectException

Check an annotated tag for errors.

Parameters
id:AnyObjectId

identity of the object being checked.

raw:byte[]

the tag data. The array is never modified.

Exceptions
CorruptObjectException:
if any error was detected.
Since
4.2
checkTreeback to summary
public void checkTree(byte[] raw) throws CorruptObjectException

Check a canonical formatted tree for errors.

Parameters
raw:byte[]

the raw tree data. The array is never modified.

Exceptions
CorruptObjectException:
if any error was detected.
checkTreeback to summary
public void checkTree(AnyObjectId id, byte[] raw) throws CorruptObjectException

Check a canonical formatted tree for errors.

Parameters
id:AnyObjectId

identity of the object being checked.

raw:byte[]

the raw tree data. The array is never modified.

Exceptions
CorruptObjectException:
if any error was detected.
Since
4.2
checkTruncatedIgnorableUTF8back to summary
private boolean checkTruncatedIgnorableUTF8(byte[] raw, int ptr, int end, AnyObjectId id) throws CorruptObjectException
duplicateNameback to summary
private static boolean duplicateName(final byte[] raw, final int thisNamePos, final int thisNameEnd)
getGitsubmodulesback to summary
public List<GitmoduleEntry> getGitsubmodules()

Get the list of ".gitmodules" files found in the pack. For each, report its blob id (e.g. to validate its contents) and the tree where it was found (e.g. to check if it is in the root)

Returns:List<GitmoduleEntry>

List of pairs of ids <tree, blob>.

Since
4.7.5
idForback to summary
private ObjectId idFor(int objType, byte[] raw)
Annotations
@Nullable
isGitback to summary
private static boolean isGit(byte[] buf, int p)
isGitmodulesback to summary
private boolean isGitmodules(byte[] buf, int start, int end, AnyObjectId id) throws CorruptObjectException

Check if the filename contained in buf[start:end] could be read as a .gitmodules file when checked out to the working directory. This ought to be a simple comparison, but some filesystems have peculiar rules for normalizing filenames: NTFS has backward-compatibility support for 8.3 synonyms of long file names (see https://web.archive.org/web/20160318181041/https://usn.pw/blog/gen/2015/06/09/filenames/ for details). NTFS is also case-insensitive. MacOS's HFS+ folds away ignorable Unicode characters in addition to case folding.

Parameters
buf:byte[]

byte array to decode

start:int

position where a supposed filename is starting

end:int

position where a supposed filename is ending

id:AnyObjectId

object id for error reporting

Returns:boolean

true if the filename in buf could be a ".gitmodules" file

Exceptions
CorruptObjectException:
if an object is corrupt
isGitTilde1back to summary
private static boolean isGitTilde1(byte[] buf, int p, int end)
isInvalidOnWindowsback to summary
private static boolean isInvalidOnWindows(byte c)
isMacHFSGitback to summary
private boolean isMacHFSGit(byte[] raw, int ptr, int end, AnyObjectId id) throws CorruptObjectException
isMacHFSGitmodulesback to summary
private boolean isMacHFSGitmodules(byte[] raw, int ptr, int end, AnyObjectId id) throws CorruptObjectException
isMacHFSPathback to summary
private boolean isMacHFSPath(byte[] raw, int ptr, int end, byte[] path, AnyObjectId id) throws CorruptObjectException
isNormalizedGitback to summary
private static boolean isNormalizedGit(byte[] raw, int ptr, int end)
isNTFSGitmodulesback to summary
private boolean isNTFSGitmodules(byte[] buf, int start, int end)
isPositiveDigitback to summary
private static boolean isPositiveDigit(byte b)
matchback to summary
private boolean match(byte[] b, byte[] src)
matchLowerCaseback to summary
private boolean matchLowerCase(byte[] b, int ptr, byte[] src)
newBlobObjectCheckerback to summary
public BlobObjectChecker newBlobObjectChecker()

Create a new org.eclipse.jgit.lib.BlobObjectChecker.

Returns:BlobObjectChecker

new BlobObjectChecker or null if it's not provided.

Annotations
@Nullable
Since
4.9
normalizeback to summary
private String normalize(byte[] raw, int ptr, int end)
reportback to summary
private void report(ObjectChecker.ErrorType err, AnyObjectId id, String why) throws CorruptObjectException
resetback to summary
public void reset()

Reset the invocation-specific state from this instance. Specifically this clears the list of .gitmodules files encountered (see getGitsubmodules()) Configurations like errors to filter, skip lists or the specified O.S. (set via setSafeForMacOS(boolean) or setSafeForWindows(boolean)) are NOT cleared.

Since
5.2
scanPathSegmentback to summary
private int scanPathSegment(byte[] raw, int ptr, int end, AnyObjectId id) throws CorruptObjectException
setAllowInvalidPersonIdentback to summary
public ObjectChecker setAllowInvalidPersonIdent(boolean allow)

Enable accepting invalid author, committer and tagger identities.

Some broken Git versions/libraries allowed users to create commits and tags with invalid formatting between the name, email and timestamp.

Parameters
allow:boolean

if true accept invalid person identity strings.

Returns:ObjectChecker

this.

Since
4.0
setAllowLeadingZeroFileModeback to summary
public ObjectChecker setAllowLeadingZeroFileMode(boolean allow)

Enable accepting leading zero mode in tree entries.

Some broken Git libraries generated leading zeros in the mode part of tree entries. This is technically incorrect but gracefully allowed by git-core. JGit rejects such trees by default, but may need to accept them on broken histories.

Same as setIgnore(ZERO_PADDED_FILEMODE, allow).

Parameters
allow:boolean

allow leading zero mode.

Returns:ObjectChecker

this.

Since
3.4
setIgnoreback to summary
public ObjectChecker setIgnore(Set<ObjectChecker.ErrorType> ids)

Configure error types to be ignored across all objects.

Parameters
ids:Set<ObjectChecker.ErrorType>

error types to ignore. The caller's set is copied.

Returns:ObjectChecker

this

Since
4.2
setIgnoreback to summary
public ObjectChecker setIgnore(ObjectChecker.ErrorType id, boolean ignore)

Add message type to be ignored across all objects.

Parameters
id:ObjectChecker.ErrorType

error type to ignore.

ignore:boolean

true to ignore this error; false to treat the error as an error and throw.

Returns:ObjectChecker

this

Since
4.2
setSafeForMacOSback to summary
public ObjectChecker setSafeForMacOS(boolean mac)

Restrict trees to only names legal on Mac OS X platforms.

Rejects any mixed case forms of reserved names (.git) for users working on HFS+ in case-insensitive (default) mode.

Parameters
mac:boolean

true if Mac OS X name checking should be performed.

Returns:ObjectChecker

this.

Since
3.4
setSafeForWindowsback to summary
public ObjectChecker setSafeForWindows(boolean win)

Restrict trees to only names legal on Windows platforms.

Also rejects any mixed case forms of reserved names (.git).

Parameters
win:boolean

true if Windows name checking should be performed.

Returns:ObjectChecker

this.

Since
3.4
setSkipListback to summary
public ObjectChecker setSkipList(ObjectIdSet objects)

Enable accepting specific malformed (but not horribly broken) objects.

Parameters
objects:ObjectIdSet

collection of object names known to be broken in a non-fatal way that should be ignored by the checker.

Returns:ObjectChecker

this

Since
4.2
toHexStringback to summary
private static String toHexString(byte[] raw, int ptr, int end)
toLowerback to summary
private static char toLower(byte b)
org.eclipse.jgit.lib back to summary

public final Enum ObjectChecker.ErrorType

extends Enum<ObjectChecker.ErrorType>
Class Inheritance

Potential issues identified by the checker.
Since
4.2

Field Summary

Modifier and TypeField and Description
public static final ObjectChecker.ErrorType
BAD_DATE

(ERROR) Invalid date format in an author/committer line.

public static final ObjectChecker.ErrorType
BAD_EMAIL

(ERROR) Invalid email format in an author/committer line.

public static final ObjectChecker.ErrorType
BAD_OBJECT_SHA1

(ERROR) An object has a bad sha1.

public static final ObjectChecker.ErrorType
BAD_PARENT_SHA1

(ERROR) A commit object has a bad parent sha1.

public static final ObjectChecker.ErrorType
BAD_TIMEZONE

(ERROR) Found an invalid time zone in an author/committer line.

public static final ObjectChecker.ErrorType
BAD_TREE_SHA1

(ERROR) A tree has an invalid format.

public static final ObjectChecker.ErrorType
BAD_UTF8

(ERROR) Byte sequence is not a valid UTF-8 character

public static final ObjectChecker.ErrorType
DUPLICATE_ENTRIES

(ERROR) A tree contains duplicate file entries.

public static final ObjectChecker.ErrorType
EMPTY_NAME

(WARN) A path contains an empty name.

public static final ObjectChecker.ErrorType
FULL_PATHNAME

(WARN) A path contains the full path starting with "/".

public static final ObjectChecker.ErrorType
GITMODULES_BLOB

(ERROR) A non-blob found at .gitmodules.

public static final ObjectChecker.ErrorType
GITMODULES_LARGE

(ERROR) The .gitmodules file is too large to parse.

public static final ObjectChecker.ErrorType
GITMODULES_NAME

(ERROR) A submodule name is invalid.

public static final ObjectChecker.ErrorType
GITMODULES_PARSE

(INFO) Could not parse .gitmodules blob.

public static final ObjectChecker.ErrorType
GITMODULES_PATH

(ERROR) .gitmodules path is invalid.

public static final ObjectChecker.ErrorType
GITMODULES_SYMLINK

(ERROR) .gitmodules is a symlink.

public static final ObjectChecker.ErrorType
GITMODULES_URL

(ERROR) Found an invalid submodule url.

public static final ObjectChecker.ErrorType
HAS_DOT

(WARN) A tree contains an entry named .

public static final ObjectChecker.ErrorType
HAS_DOTDOT

(WARN) A tree contains an entry named ..

public static final ObjectChecker.ErrorType
HAS_DOTGIT

(WARN) A tree contains an entry named .git

public static final ObjectChecker.ErrorType
MISSING_AUTHOR

(ERROR) Author is missing.

public static final ObjectChecker.ErrorType
MISSING_COMMITTER

(ERROR) Committer is missing.

public static final ObjectChecker.ErrorType
MISSING_EMAIL

(ERROR) Email is missing in an author/committer line.

public static final ObjectChecker.ErrorType
MISSING_OBJECT

(ERROR) Missing object line in tag object.

public static final ObjectChecker.ErrorType
MISSING_SPACE_BEFORE_DATE

(ERROR) Missing space before date in an author/committer line.

public static final ObjectChecker.ErrorType
MISSING_TAG_ENTRY

(ERROR) Missing tag line in a tag object.

public static final ObjectChecker.ErrorType
MISSING_TREE

(ERROR) Missing tree line in a commit object.

public static final ObjectChecker.ErrorType
MISSING_TYPE_ENTRY

(ERROR) Missing type line in a tag object.

public static final ObjectChecker.ErrorType
NULL_SHA1

(WARN) Tree contains entries pointing to a null sha1.

public static final ObjectChecker.ErrorType
TREE_NOT_SORTED

(ERROR) A tree is not properly sorted.

public static final ObjectChecker.ErrorType
UNKNOWN_TYPE

(ERROR) Found an unknown object type.

public static final ObjectChecker.ErrorType
WIN32_BAD_NAME

(ERROR) Windows: Invalid name

public static final ObjectChecker.ErrorType
ZERO_PADDED_FILEMODE

(WARN) Found a zero padded filemode in a tree.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

camelCaseVersion of the name.
getMessageId
()

Get camelCaseVersion of the name

public static ObjectChecker.ErrorType
public static ObjectChecker.ErrorType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

BAD_DATEback to summary
public static final ObjectChecker.ErrorType BAD_DATE

(ERROR) Invalid date format in an author/committer line.

BAD_EMAILback to summary
public static final ObjectChecker.ErrorType BAD_EMAIL

(ERROR) Invalid email format in an author/committer line.

BAD_OBJECT_SHA1back to summary
public static final ObjectChecker.ErrorType BAD_OBJECT_SHA1

(ERROR) An object has a bad sha1.

BAD_PARENT_SHA1back to summary
public static final ObjectChecker.ErrorType BAD_PARENT_SHA1

(ERROR) A commit object has a bad parent sha1.

BAD_TIMEZONEback to summary
public static final ObjectChecker.ErrorType BAD_TIMEZONE

(ERROR) Found an invalid time zone in an author/committer line.

BAD_TREE_SHA1back to summary
public static final ObjectChecker.ErrorType BAD_TREE_SHA1

(ERROR) A tree has an invalid format.

BAD_UTF8back to summary
public static final ObjectChecker.ErrorType BAD_UTF8

(ERROR) Byte sequence is not a valid UTF-8 character

DUPLICATE_ENTRIESback to summary
public static final ObjectChecker.ErrorType DUPLICATE_ENTRIES

(ERROR) A tree contains duplicate file entries.

EMPTY_NAMEback to summary
public static final ObjectChecker.ErrorType EMPTY_NAME

(WARN) A path contains an empty name.

FULL_PATHNAMEback to summary
public static final ObjectChecker.ErrorType FULL_PATHNAME

(WARN) A path contains the full path starting with "/".

GITMODULES_BLOBback to summary
public static final ObjectChecker.ErrorType GITMODULES_BLOB

(ERROR) A non-blob found at .gitmodules.

Since
5.2
GITMODULES_LARGEback to summary
public static final ObjectChecker.ErrorType GITMODULES_LARGE

(ERROR) The .gitmodules file is too large to parse.

Since
5.2
GITMODULES_NAMEback to summary
public static final ObjectChecker.ErrorType GITMODULES_NAME

(ERROR) A submodule name is invalid.

Since
5.2
GITMODULES_PARSEback to summary
public static final ObjectChecker.ErrorType GITMODULES_PARSE

(INFO) Could not parse .gitmodules blob.

Since
5.2
GITMODULES_PATHback to summary
public static final ObjectChecker.ErrorType GITMODULES_PATH

(ERROR) .gitmodules path is invalid.

Since
5.2
GITMODULES_URLback to summary
public static final ObjectChecker.ErrorType GITMODULES_URL

(ERROR) Found an invalid submodule url.

Since
5.2
HAS_DOTback to summary
public static final ObjectChecker.ErrorType HAS_DOT

(WARN) A tree contains an entry named .

HAS_DOTDOTback to summary
public static final ObjectChecker.ErrorType HAS_DOTDOT

(WARN) A tree contains an entry named ..

HAS_DOTGITback to summary
public static final ObjectChecker.ErrorType HAS_DOTGIT

(WARN) A tree contains an entry named .git

MISSING_AUTHORback to summary
public static final ObjectChecker.ErrorType MISSING_AUTHOR

(ERROR) Author is missing.

MISSING_COMMITTERback to summary
public static final ObjectChecker.ErrorType MISSING_COMMITTER

(ERROR) Committer is missing.

MISSING_EMAILback to summary
public static final ObjectChecker.ErrorType MISSING_EMAIL

(ERROR) Email is missing in an author/committer line.

MISSING_OBJECTback to summary
public static final ObjectChecker.ErrorType MISSING_OBJECT

(ERROR) Missing object line in tag object.

MISSING_SPACE_BEFORE_DATEback to summary
public static final ObjectChecker.ErrorType MISSING_SPACE_BEFORE_DATE

(ERROR) Missing space before date in an author/committer line.

MISSING_TAG_ENTRYback to summary
public static final ObjectChecker.ErrorType MISSING_TAG_ENTRY

(ERROR) Missing tag line in a tag object.

MISSING_TREEback to summary
public static final ObjectChecker.ErrorType MISSING_TREE

(ERROR) Missing tree line in a commit object.

MISSING_TYPE_ENTRYback to summary
public static final ObjectChecker.ErrorType MISSING_TYPE_ENTRY

(ERROR) Missing type line in a tag object.

NULL_SHA1back to summary
public static final ObjectChecker.ErrorType NULL_SHA1

(WARN) Tree contains entries pointing to a null sha1.

TREE_NOT_SORTEDback to summary
public static final ObjectChecker.ErrorType TREE_NOT_SORTED

(ERROR) A tree is not properly sorted.

UNKNOWN_TYPEback to summary
public static final ObjectChecker.ErrorType UNKNOWN_TYPE

(ERROR) Found an unknown object type.

WIN32_BAD_NAMEback to summary
public static final ObjectChecker.ErrorType WIN32_BAD_NAME

(ERROR) Windows: Invalid name

ZERO_PADDED_FILEMODEback to summary
public static final ObjectChecker.ErrorType ZERO_PADDED_FILEMODE

(WARN) Found a zero padded filemode in a tree.

Constructor Detail

ErrorTypeback to summary
private ErrorType()

Method Detail

getMessageIdback to summary
public String getMessageId()

Get camelCaseVersion of the name

Returns:String

camelCaseVersion of the name.

valueOfback to summary
public static ObjectChecker.ErrorType valueOf(String name)
valuesback to summary
public static ObjectChecker.ErrorType[] values()