java.lang.Object
org.eclipse.jgit.lib.Repository
org.eclipse.jgit.internal.storage.dfs.DfsRepository
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
InMemoryRepository
A Git repository on a DFS.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDfsRepository(DfsRepositoryBuilder builder) Initialize a DFS repository. -
Method Summary
Modifier and TypeMethodDescriptionvoidcreate(boolean bare) Create a new Git repository initializing the necessary files and directories.Create a newAttributesNodeProvider.booleanexists()Check if the repository already exists.Get the configuration of this repository.Get the description of this repository.Get repository identifier.abstract DfsObjDatabaseGet the object database which stores this repository's data.getReflogReader(String refName) Get the reflog readervoidnotifyIndexChanged(boolean internal) Notify that the index changed by firing an IndexChangedEvent.voidForce a scan for changed refs.Methods inherited from class org.eclipse.jgit.lib.Repository
autoGC, close, create, doClose, exactRef, findRef, fireEvent, getAdditionalHaves, getAllRefs, getAllRefsByPeeledObjectId, getBranch, getDirectory, getFS, getFullBranch, getGitwebDescription, getGlobalListenerList, getIndexFile, getInitialBranch, getListenerList, getRefDatabase, getReflogReader, getRemoteName, getRemoteNames, getRepositoryState, getTags, getWorkTree, hasObject, incrementOpen, isBare, isValidRefName, lockDirCache, newObjectInserter, newObjectReader, normalizeBranchName, open, open, parseCommit, peel, readCherryPickHead, readCommitEditMsg, readDirCache, readMergeCommitMsg, readMergeHeads, readOrigHead, readRebaseTodo, readRevertHead, readSquashCommitMsg, renameRef, resolve, setGitwebDescription, shortenRefName, shortenRemoteBranchName, simplify, stripWorkDir, toString, updateRef, updateRef, writeCherryPickHead, writeCommitEditMsg, writeMergeCommitMsg, writeMergeHeads, writeOrigHead, writeRebaseTodoFile, writeRevertHead, writeSquashCommitMsg
-
Constructor Details
-
DfsRepository
Initialize a DFS repository.- Parameters:
builder- description of the repository.
-
-
Method Details
-
getObjectDatabase
Description copied from class:RepositoryGet the object database which stores this repository's data.- Specified by:
getObjectDatabasein classRepository- Returns:
- the object database which stores this repository's data.
-
getDescription
Get the description of this repository.- Returns:
- the description of this repository.
-
exists
Check if the repository already exists.- Returns:
- true if the repository exists; false if it is new.
- Throws:
IOException- the repository cannot be checked.
-
create
Description copied from class:RepositoryCreate a new Git repository initializing the necessary files and directories.- Specified by:
createin classRepository- Parameters:
bare- if true, a bare repository (a repository without a working directory) is created.- Throws:
IOException- in case of IO problem
-
getConfig
Description copied from class:RepositoryGet the configuration of this repository.- Specified by:
getConfigin classRepository- Returns:
- the configuration of this repository.
-
getIdentifier
Description copied from class:RepositoryGet repository identifier.- Specified by:
getIdentifierin classRepository- Returns:
- repository identifier. The returned identifier has to be unique within a given Git server.
-
scanForRepoChanges
Description copied from class:RepositoryForce a scan for changed refs. Fires an IndexChangedEvent(false) if changes are detected.- Specified by:
scanForRepoChangesin classRepository- Throws:
IOException- if an IO error occurred
-
notifyIndexChanged
public void notifyIndexChanged(boolean internal) Description copied from class:RepositoryNotify that the index changed by firing an IndexChangedEvent.- Specified by:
notifyIndexChangedin classRepository- Parameters:
internal-trueif the index was changed by the same JGit process
-
getReflogReader
Description copied from class:RepositoryGet the reflog reader- Specified by:
getReflogReaderin classRepository- Parameters:
refName- aStringobject.- Returns:
- a
ReflogReaderfor the supplied refname, ornullif the named ref does not exist. - Throws:
IOException- the ref could not be accessed.
-
createAttributesNodeProvider
Description copied from class:RepositoryCreate a newAttributesNodeProvider.- Specified by:
createAttributesNodeProviderin classRepository- Returns:
- a new
AttributesNodeProvider. ThisAttributesNodeProvideris lazy loaded only once. It means that it will not be updated after loading. Prefer creating new instance for each use.
-