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

public abstract Class DfsRepository

extends Repository
Class Inheritance
Known Direct Subclasses
org.eclipse.jgit.internal.storage.dfs.InMemoryRepository
Imports
java.io.IOException, .InputStream, java.text.MessageFormat, java.util.Collections, org.eclipse.jgit.attributes.AttributesNode, .AttributesNodeProvider, .AttributesRule, org.eclipse.jgit.internal.JGitText, org.eclipse.jgit.lib.Constants, .RefUpdate, .ReflogReader, .Repository, .StoredConfig

A Git repository on a DFS.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final DfsConfig
private final DfsRepositoryDescription

Constructor Summary

AccessConstructor and Description
protected
DfsRepository(DfsRepositoryBuilder<B extends DfsRepositoryBuilder, R extends DfsRepository>
description of the repository.
builder
)

Initialize a DFS repository.

Method Summary

Modifier and TypeMethod and Description
public void
create(boolean
if true, a bare repository (a repository without a working directory) is created.
bare
)

Implements abstract org.eclipse.jgit.lib.Repository.create.

Create a new Git repository initializing the necessary files and directories.

public AttributesNodeProvider
public boolean

Returns:

true if the repository exists; false if it is new.
exists
()

Check if the repository already exists.

public StoredConfig
getConfig()

Implements abstract org.eclipse.jgit.lib.Repository.getConfig.

Get the configuration of this repository.

public DfsRepositoryDescription

Returns:

the description of this repository.
getDescription
()

Get the description of this repository.

public String
getIdentifier()

Implements abstract org.eclipse.jgit.lib.Repository.getIdentifier.

Get repository identifier.

public abstract DfsObjDatabase
getObjectDatabase()

Implements abstract org.eclipse.jgit.lib.Repository.getObjectDatabase.

Get the object database which stores this repository's data.

public ReflogReader
public void
notifyIndexChanged(boolean
true if the index was changed by the same JGit process
internal
)

Implements abstract org.eclipse.jgit.lib.Repository.notifyIndexChanged.

Notify that the index changed by firing an IndexChangedEvent.

public void
scanForRepoChanges()

Implements abstract org.eclipse.jgit.lib.Repository.scanForRepoChanges.

Force a scan for changed refs.

Inherited from org.eclipse.jgit.lib.Repository:
autoGCclosecreatedoCloseexactReffindReffireEventgetAdditionalHavesgetAllRefsgetAllRefsByPeeledObjectIdgetBranchgetCommonDirectorygetDirectorygetFSgetFullBranchgetGitwebDescriptiongetGlobalListenerListgetIndexFilegetInitialBranchgetListenerListgetRefDatabasegetReflogReadergetRemoteNamegetRemoteNamesgetRepositoryStategetTagsgetWorkTreeincrementOpenisBareisValidRefNameisWorkTreeCaseInsensitivelockDirCachenewObjectInserternewObjectReadernormalizeBranchNameopenopenparseCommitreadCherryPickHeadreadCommitEditMsgreadDirCachereadMergeCommitMsgreadMergeHeadsreadOrigHeadreadRebaseTodoreadRevertHeadreadSquashCommitMsgrenameRefresolvesetGitwebDescriptionshortenRefNameshortenRemoteBranchNamesimplifystripWorkDirtoStringupdateRefupdateRefwriteCherryPickHeadwriteCommitEditMsgwriteMergeCommitMsgwriteMergeHeadswriteOrigHeadwriteRebaseTodoFilewriteRevertHeadwriteSquashCommitMsg

Field Detail

configback to summary
private final DfsConfig config
descriptionback to summary
private final DfsRepositoryDescription description

Constructor Detail

DfsRepositoryback to summary
protected DfsRepository(DfsRepositoryBuilder<B extends DfsRepositoryBuilder, R extends DfsRepository> builder)

Initialize a DFS repository.

Parameters
builder:DfsRepositoryBuilder<B extends DfsRepositoryBuilder, R extends DfsRepository>

description of the repository.

Method Detail

createback to summary
public void create(boolean bare) throws IOException

Implements abstract org.eclipse.jgit.lib.Repository.create.

Doc from org.eclipse.jgit.lib.Repository.create.

Create a new Git repository initializing the necessary files and directories.

Parameters
bare:boolean

if true, a bare repository (a repository without a working directory) is created.

Annotations
@Override
Exceptions
IOException:
in case of IO problem
createAttributesNodeProviderback to summary
public AttributesNodeProvider createAttributesNodeProvider()

Implements abstract org.eclipse.jgit.lib.Repository.createAttributesNodeProvider.

Doc from org.eclipse.jgit.lib.Repository.createAttributesNodeProvider.

Create a new org.eclipse.jgit.attributes.AttributesNodeProvider.

Returns:AttributesNodeProvider

a new org.eclipse.jgit.attributes.AttributesNodeProvider. This org.eclipse.jgit.attributes.AttributesNodeProvider is lazy loaded only once. It means that it will not be updated after loading. Prefer creating new instance for each use.

Annotations
@Override
existsback to summary
public boolean exists() throws IOException

Check if the repository already exists.

Returns:boolean

true if the repository exists; false if it is new.

Exceptions
IOException:
the repository cannot be checked.
getConfigback to summary
public StoredConfig getConfig()

Implements abstract org.eclipse.jgit.lib.Repository.getConfig.

Doc from org.eclipse.jgit.lib.Repository.getConfig.

Get the configuration of this repository.

Returns:StoredConfig

the configuration of this repository.

Annotations
@Override
getDescriptionback to summary
public DfsRepositoryDescription getDescription()

Get the description of this repository.

Returns:DfsRepositoryDescription

the description of this repository.

getIdentifierback to summary
public String getIdentifier()

Implements abstract org.eclipse.jgit.lib.Repository.getIdentifier.

Doc from org.eclipse.jgit.lib.Repository.getIdentifier.

Get repository identifier.

Returns:String

repository identifier. The returned identifier has to be unique within a given Git server.

Annotations
@Override
getObjectDatabaseback to summary
public abstract DfsObjDatabase getObjectDatabase()

Implements abstract org.eclipse.jgit.lib.Repository.getObjectDatabase.

Doc from org.eclipse.jgit.lib.Repository.getObjectDatabase.

Get the object database which stores this repository's data.

Returns:DfsObjDatabase

the object database which stores this repository's data.

Annotations
@Override
getReflogReaderback to summary
public ReflogReader getReflogReader(String refName) throws IOException

Overrides org.eclipse.jgit.lib.Repository.getReflogReader.

Doc from org.eclipse.jgit.lib.Repository.getReflogReader.

Get the reflog reader

Parameters
refName:String

a java.lang.String object.

Returns:ReflogReader

a org.eclipse.jgit.lib.ReflogReader for the supplied refname, or null if the named ref does not exist.

Annotations
@Override
Exceptions
IOException:
the ref could not be accessed.
notifyIndexChangedback to summary
public void notifyIndexChanged(boolean internal)

Implements abstract org.eclipse.jgit.lib.Repository.notifyIndexChanged.

Doc from org.eclipse.jgit.lib.Repository.notifyIndexChanged.

Notify that the index changed by firing an IndexChangedEvent.

Parameters
internal:boolean

true if the index was changed by the same JGit process

Annotations
@Override
scanForRepoChangesback to summary
public void scanForRepoChanges() throws IOException

Implements abstract org.eclipse.jgit.lib.Repository.scanForRepoChanges.

Doc from org.eclipse.jgit.lib.Repository.scanForRepoChanges.

Force a scan for changed refs. Fires an IndexChangedEvent(false) if changes are detected.

Annotations
@Override
Exceptions
IOException:
if an IO error occurred
org.eclipse.jgit.internal.storage.dfs back to summary

private Class DfsRepository.EmptyAttributesNodeProvider

extends Object
implements AttributesNodeProvider
Class Inheritance
  • java.lang.Object
  • org.eclipse.jgit.internal.storage.dfs.DfsRepository.EmptyAttributesNodeProvider
All Implemented Interfaces
org.eclipse.jgit.attributes.AttributesNodeProvider

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private DfsRepository.EmptyAttributesNodeProvider.EmptyAttributesNode

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public AttributesNode
getGlobalAttributesNode()

Implements org.eclipse.jgit.attributes.AttributesNodeProvider.getGlobalAttributesNode.

Retrieve the org.eclipse.jgit.attributes.AttributesNode that holds the information located in the global gitattributes file.

public AttributesNode
getInfoAttributesNode()

Implements org.eclipse.jgit.attributes.AttributesNodeProvider.getInfoAttributesNode.

Retrieve the org.eclipse.jgit.attributes.AttributesNode that holds the information located in $GIT_DIR/info/attributes file.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

emptyAttributesNodeback to summary
private DfsRepository.EmptyAttributesNodeProvider.EmptyAttributesNode emptyAttributesNode

Constructor Detail

EmptyAttributesNodeProviderback to summary
private EmptyAttributesNodeProvider()

Method Detail

getGlobalAttributesNodeback to summary
public AttributesNode getGlobalAttributesNode() throws IOException

Implements org.eclipse.jgit.attributes.AttributesNodeProvider.getGlobalAttributesNode.

Doc from org.eclipse.jgit.attributes.AttributesNodeProvider.getGlobalAttributesNode.

Retrieve the org.eclipse.jgit.attributes.AttributesNode that holds the information located in the global gitattributes file.

Returns:AttributesNode

the org.eclipse.jgit.attributes.AttributesNode that holds the information located in the global gitattributes file.

Annotations
@Override
Exceptions
IOException:
java.io.IOException if an error is raised while parsing the attributes file
getInfoAttributesNodeback to summary
public AttributesNode getInfoAttributesNode() throws IOException

Implements org.eclipse.jgit.attributes.AttributesNodeProvider.getInfoAttributesNode.

Doc from org.eclipse.jgit.attributes.AttributesNodeProvider.getInfoAttributesNode.

Retrieve the org.eclipse.jgit.attributes.AttributesNode that holds the information located in $GIT_DIR/info/attributes file.

Returns:AttributesNode

the org.eclipse.jgit.attributes.AttributesNode that holds the information located in $GIT_DIR/info/attributes file.

Annotations
@Override
Exceptions
IOException:
if an error is raised while parsing the attributes file
org.eclipse.jgit.internal.storage.dfs back to summary

private Class DfsRepository.EmptyAttributesNodeProvider.EmptyAttributesNode

extends AttributesNode
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
parse(InputStream
input stream holding the standard ignore format. The caller is responsible for closing the stream.
in
)

Overrides org.eclipse.jgit.attributes.AttributesNode.parse.

Parse files according to gitattribute standards.

Inherited from org.eclipse.jgit.attributes.AttributesNode:
getRules

Constructor Detail

EmptyAttributesNodeback to summary
public EmptyAttributesNode()

Method Detail

parseback to summary
public void parse(InputStream in) throws IOException

Overrides org.eclipse.jgit.attributes.AttributesNode.parse.

Doc from org.eclipse.jgit.attributes.AttributesNode.parse.

Parse files according to gitattribute standards.

Parameters
in:InputStream

input stream holding the standard ignore format. The caller is responsible for closing the stream.

Annotations
@Override
Exceptions
IOException:
Error thrown when reading an ignore file.