Class DfsFsck
java.lang.Object
org.eclipse.jgit.internal.storage.dfs.DfsFsck
Verify the validity and connectivity of a DFS repository.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate ObjectCheckerprivate final DfsObjDatabaseprivate final DfsRepository -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheck(ProgressMonitor pm) Verify the integrity and connectivity of all objects in the object database.private voidcheckConnectivity(ProgressMonitor pm, FsckError errors) private voidcheckGitModules(ProgressMonitor pm, FsckError errors) private voidcheckPacks(ProgressMonitor pm, FsckError errors) voidsetConnectivityOnly(boolean connectivityOnly) Whether fsck should bypass object validity and integrity checks and only check connectivity.voidsetObjectChecker(ObjectChecker objChecker) Use a customized object checker instead of the default one.private voidverifyPack(ProgressMonitor pm, FsckError errors, DfsReader ctx, DfsPackFile pack, ReadableChannel ch)
-
Field Details
-
repo
-
objdb
-
objChecker
-
connectivityOnly
private boolean connectivityOnly
-
-
Constructor Details
-
DfsFsck
Initialize DFS fsck.- Parameters:
repository- the dfs repository to check.
-
-
Method Details
-
check
Verify the integrity and connectivity of all objects in the object database.- Parameters:
pm- callback to provide progress feedback during the check.- Returns:
- all errors about the repository.
- Throws:
IOException- if encounters IO errors during the process.
-
checkPacks
private void checkPacks(ProgressMonitor pm, FsckError errors) throws IOException, FileNotFoundException - Throws:
IOExceptionFileNotFoundException
-
verifyPack
private void verifyPack(ProgressMonitor pm, FsckError errors, DfsReader ctx, DfsPackFile pack, ReadableChannel ch) throws IOException, CorruptPackIndexException - Throws:
IOExceptionCorruptPackIndexException
-
checkGitModules
- Throws:
IOException
-
checkConnectivity
- Throws:
IOException
-
setObjectChecker
Use a customized object checker instead of the default one. Caller can specify a skip list to ignore some errors. It will be reset at the start of each {check(ProgressMonitor)call.- Parameters:
objChecker- A customized object checker.
-
setConnectivityOnly
public void setConnectivityOnly(boolean connectivityOnly) Whether fsck should bypass object validity and integrity checks and only check connectivity.- Parameters:
connectivityOnly- whether fsck should bypass object validity and integrity checks and only check connectivity. The default isfalse, meaning to run all checks.
-