Class DfsRepository
- java.lang.Object
-
- org.eclipse.jgit.lib.Repository
-
- org.eclipse.jgit.internal.storage.dfs.DfsRepository
-
- Direct Known Subclasses:
InMemoryRepository
public abstract class DfsRepository extends Repository
A Git repository on a DFS.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDfsRepository(DfsRepositoryBuilder builder)Initialize a DFS repository.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcreate(boolean bare)Create a new Git repository initializing the necessary files and directories.booleanexists()Check if the repository already exists.StoredConfiggetConfig()DfsRepositoryDescriptiongetDescription()abstract DfsObjDatabasegetObjectDatabase()abstract DfsRefDatabasegetRefDatabase()ReflogReadergetReflogReader(String refName)voidnotifyIndexChanged()Notify that the index changedvoidscanForRepoChanges()Force a scan for changed refs.-
Methods inherited from class org.eclipse.jgit.lib.Repository
close, create, doClose, fireEvent, getAdditionalHaves, getAllRefs, getAllRefsByPeeledObjectId, getBranch, getDirectory, getFS, getFullBranch, getGlobalListenerList, getIndexFile, getListenerList, getRef, getRemoteName, getRemoteNames, getRepositoryState, getTags, getWorkTree, hasObject, incrementOpen, isBare, isValidRefName, lockDirCache, newObjectInserter, newObjectReader, open, open, peel, readCherryPickHead, readDirCache, readMergeCommitMsg, readMergeHeads, readOrigHead, readRebaseTodo, readRevertHead, readSquashCommitMsg, renameRef, resolve, shortenRefName, shortenRemoteBranchName, simplify, stripWorkDir, toString, updateRef, updateRef, writeCherryPickHead, writeMergeCommitMsg, writeMergeHeads, writeOrigHead, writeRebaseTodoFile, writeRevertHead, writeSquashCommitMsg
-
-
-
-
Constructor Detail
-
DfsRepository
protected DfsRepository(DfsRepositoryBuilder builder)
Initialize a DFS repository.- Parameters:
builder- description of the repository.
-
-
Method Detail
-
getObjectDatabase
public abstract DfsObjDatabase getObjectDatabase()
- Specified by:
getObjectDatabasein classRepository- Returns:
- the object database which stores this repository's data.
-
getRefDatabase
public abstract DfsRefDatabase getRefDatabase()
- Specified by:
getRefDatabasein classRepository- Returns:
- the reference database which stores the reference namespace.
-
getDescription
public DfsRepositoryDescription getDescription()
- Returns:
- a description of this repository.
-
exists
public boolean exists() throws IOExceptionCheck if the repository already exists.- Returns:
- true if the repository exists; false if it is new.
- Throws:
IOException- the repository cannot be checked.
-
create
public void create(boolean bare) throws IOExceptionDescription 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
public StoredConfig getConfig()
- Specified by:
getConfigin classRepository- Returns:
- the configuration of this repository
-
scanForRepoChanges
public void scanForRepoChanges() throws IOExceptionDescription copied from class:RepositoryForce a scan for changed refs.- Specified by:
scanForRepoChangesin classRepository- Throws:
IOException
-
notifyIndexChanged
public void notifyIndexChanged()
Description copied from class:RepositoryNotify that the index changed- Specified by:
notifyIndexChangedin classRepository
-
getReflogReader
public ReflogReader getReflogReader(String refName) throws IOException
- Specified by:
getReflogReaderin classRepository- Returns:
- a
ReflogReaderfor the supplied refname, or null if the named ref does not exist. - Throws:
IOException- the ref could not be accessed.
-
-