Top Description Fields Constructors Methods
org.eclipse.jgit.internal.storage.dfs

public Class DfsFsck

extends Object
Class Inheritance
Static Imports
java.nio.charset.StandardCharsets.UTF_8, org.eclipse.jgit.internal.storage.pack.PackExt.INDEX, .PackExt.PACK

Verify the validity and connectivity of a DFS repository.

Field Summary

Modifier and TypeField and Description
private boolean
private ObjectChecker
private final DfsObjDatabase
private final DfsRepository

Constructor Summary

AccessConstructor and Description
public
DfsFsck(DfsRepository
the dfs repository to check.
repository
)

Initialize DFS fsck.

Method Summary

Modifier and TypeMethod and Description
public FsckError

Returns:

all errors about the repository.
check
(ProgressMonitor
callback to provide progress feedback during the check.
pm
)

Verify the integrity and connectivity of all objects in the object database.

private void
private void
private void
public void
setConnectivityOnly(boolean
whether fsck should bypass object validity and integrity checks and only check connectivity. The default is false, meaning to run all checks.
connectivityOnly
)

Whether fsck should bypass object validity and integrity checks and only check connectivity.

public void
setObjectChecker(ObjectChecker
A customized object checker.
objChecker
)

Use a customized object checker instead of the default one.

private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

connectivityOnlyback to summary
private boolean connectivityOnly
objCheckerback to summary
private ObjectChecker objChecker
objdbback to summary
private final DfsObjDatabase objdb
repoback to summary
private final DfsRepository repo

Constructor Detail

DfsFsckback to summary
public DfsFsck(DfsRepository repository)

Initialize DFS fsck.

Parameters
repository:DfsRepository

the dfs repository to check.

Method Detail

checkback to summary
public FsckError check(ProgressMonitor pm) throws IOException

Verify the integrity and connectivity of all objects in the object database.

Parameters
pm:ProgressMonitor

callback to provide progress feedback during the check.

Returns:FsckError

all errors about the repository.

Exceptions
IOException:
if encounters IO errors during the process.
checkConnectivityback to summary
private void checkConnectivity(ProgressMonitor pm, FsckError errors) throws IOException
checkGitModulesback to summary
private void checkGitModules(ProgressMonitor pm, FsckError errors) throws IOException
checkPacksback to summary
private void checkPacks(ProgressMonitor pm, FsckError errors) throws IOException, FileNotFoundException
setConnectivityOnlyback to summary
public void setConnectivityOnly(boolean connectivityOnly)

Whether fsck should bypass object validity and integrity checks and only check connectivity.

Parameters
connectivityOnly:boolean

whether fsck should bypass object validity and integrity checks and only check connectivity. The default is false, meaning to run all checks.

setObjectCheckerback to summary
public void setObjectChecker(ObjectChecker objChecker)

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:ObjectChecker

A customized object checker.

verifyPackback to summary
private void verifyPack(ProgressMonitor pm, FsckError errors, DfsReader ctx, DfsPackFile pack, ReadableChannel ch) throws IOException, CorruptPackIndexException