Example usage for Java org.eclipse.jgit.lib Repository fields, constructors, methods, implement or subclass
The text is from its open source code.
Repository(BaseRepositoryBuilder options) Initialize a new repository instance. |
void | close() Decrement the use count, and maybe close resources. |
void | create() Create a new Git repository. |
void | create(boolean bare) Create a new Git repository initializing the necessary files and directories. |
AttributesNodeProvider | createAttributesNodeProvider() Create a new org.eclipse.jgit.attributes.AttributesNodeProvider . |
Ref | exactRef(String name) Get a ref by name. |
Ref | findRef(String name) Search for a ref by (possibly abbreviated) name. |
void | fireEvent(RepositoryEvent> event) Fire an event to all registered listeners. |
Map | getAllRefs() Get mutable map of all known refs, including symrefs like HEAD that may not point to any object yet. |
Map | getAllRefsByPeeledObjectId() Get a map with all objects referenced by a peeled ref. |
String | getBranch() Get the short name of the current branch that HEAD points to. |
StoredConfig | getConfig() Get the configuration of this repository. |
File | getDirectory() Get local metadata directory |
FS | getFS() Get the used file system abstraction. |
String | getFullBranch() Get the name of the reference that HEAD points to. |
ListenerList | getGlobalListenerList() Get the global listener list observing all events in this JVM. |
File | getIndexFile() Get the index file location or null if repository isn't local. |
ListenerList | getListenerList() Get listeners observing only events on this repository. |
ObjectDatabase | getObjectDatabase() Get the object database which stores this repository's data. |
RefDatabase | getRefDatabase() Get the reference database which stores the reference namespace. |
String | getRemoteName(String refName) Get remote name |
Set | getRemoteNames() Get the names of all known remotes |
RepositoryState | getRepositoryState() Get the repository state |
Map | getTags() Get mutable map of all tags |
File | getWorkTree() Get the root directory of the working tree, where files are checked out for viewing and editing. |
boolean | hasObject(AnyObjectId objectId) Whether the specified object is stored in this repo or any of the known shared repositories. |
boolean | isBare() Whether this repository is bare |
boolean | isValidRefName(String refName) Check validity of a ref name. |
DirCache | lockDirCache() Create a new in-core index representation, lock it, and read from disk. |
ObjectInserter | newObjectInserter() Create a new inserter to create objects in #getObjectDatabase() . |
ObjectReader | newObjectReader() Create a new reader to read objects from #getObjectDatabase() . |
String | normalizeBranchName(String name) Normalizes the passed branch name into a possible valid branch name. |
ObjectLoader | open(AnyObjectId objectId) Open an object from this repository. |
ObjectLoader | open(AnyObjectId objectId, int typeHint) Open an object from this repository. |
Ref | peel(Ref ref) Peel a possibly unpeeled reference to an annotated tag. |
ObjectId | readCherryPickHead() Return the information stored in the file $GIT_DIR/CHERRY_PICK_HEAD. |
DirCache | readDirCache() Create a new in-core index representation and read an index from disk. |
List | readRebaseTodo(String path, boolean includeComments) Read a file formatted like the git-rebase-todo file. |
String | readSquashCommitMsg() Return the information stored in the file $GIT_DIR/SQUASH_MSG. |
RefRename | renameRef(String fromRef, String toRef) Create a command to rename a ref in this repository |
ObjectId | resolve(String revstr) Parse a git revision string and return an object id. |
String | shortenRefName(String refName) Get a shortened more user friendly ref name |
String | stripWorkDir(File workDir, File file) Strip work dir and return normalized repository path. |
String | toString() |
RefUpdate | updateRef(String ref) Create a command to update, create or delete a ref in this repository. |
RefUpdate | updateRef(String ref, boolean detach) Create a command to update, create or delete a ref in this repository. |
void | writeCherryPickHead(ObjectId head) Write cherry pick commit into $GIT_DIR/CHERRY_PICK_HEAD. |
void | writeMergeCommitMsg(String msg) Write new content to the file $GIT_DIR/MERGE_MSG. |
void | writeMergeHeads(List extends ObjectId> heads) Write new merge-heads into $GIT_DIR/MERGE_HEAD. |
void | writeRebaseTodoFile(String path, List Write a file formatted like a git-rebase-todo file. |
void | writeRevertHead(ObjectId head) Write revert commit into $GIT_DIR/REVERT_HEAD. |
void | writeSquashCommitMsg(String msg) Write new content to the file $GIT_DIR/SQUASH_MSG. |