| layout | default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| menu_item | api | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| title | Repository | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description | Version 0.26.1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return_to |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sections |
|
Repository.discover(startPath, acrossFs, ceilingDirs).then(function(string) {
// Use string
});Creates a branch with the passed in name pointing to the commit
| Parameters | Type | |
|---|---|---|
| startPath | String | The base path where the lookup starts. |
| acrossFs | Number | If non-zero, then the lookup will not stop when a filesystem device change is detected while exploring parent directories. |
| ceilingDirs | String | A list of absolute symbolic link free paths. the search will stop if any of these paths are hit. This may be set to null |
| Returns | |
|---|---|
| String | Path of the git repository |
Repository.init(path, is_bare).then(function(repository) {
// Use repository
});| Parameters | Type | |
|---|---|---|
| path | String | the path to the repository |
| is_bare | Number | if true, a Git repository without a working directory is created at the pointed path. If false, provided path will be considered as the working directory into which the .git directory will be created. |
| Returns | |
|---|---|
| Repository |
Repository.initExt(repo_path, opts).then(function(repository) {
// Use repository
});| Parameters | Type | |
|---|---|---|
| repo_path | String | The path to the repository. |
| opts | RepositoryInitOptions | Pointer to git_repository_init_options struct. |
| Returns | |
|---|---|
| Repository |
Repository.open(path).then(function(repository) {
// Use repository
});| Parameters | Type | |
|---|---|---|
| path | String | the path to the repository |
| Returns | |
|---|---|
| Repository |
Repository.openBare(bare_path).then(function(repository) {
// Use repository
});| Parameters | Type | |
|---|---|---|
| bare_path | String | Direct path to the bare repository |
| Returns | |
|---|---|
| Repository |
Repository.openExt(path, flags, ceiling_dirs).then(function(repository) {
// Use repository
});| Parameters | Type | |
|---|---|---|
| path | String | Path to open as git repository. If the flags permit "searching", then this can be a path to a subdirectory inside the working directory of the repository. May be NULL if flags is GIT_REPOSITORY_OPEN_FROM_ENV. |
| flags | Number | A combination of the GIT_REPOSITORY_OPEN flags above. |
| ceiling_dirs | String | A GIT_PATH_LIST_SEPARATOR delimited list of path prefixes at which the search for a containing repository should terminate. |
| Returns | |
|---|---|
| Repository |
Repository.openFromWorktree(wt).then(function(repository) {
// Use repository
});| Parameters | Type | |
|---|---|---|
| wt | Worktree | Working tree to open |
| Returns | |
|---|---|
| Repository |
Repository.wrapOdb(odb).then(function(repository) {
// Use repository
});| Parameters | Type | |
|---|---|---|
| odb | Odb | the object database to wrap |
| Returns | |
|---|---|
| Repository |
repository.checkoutBranch(branch, opts).then(function() {
// method complete});This will set the HEAD to point to the local branch and then attempt to update the index and working tree to match the content of the latest commit on that branch
| Parameters | Type | | --- | --- | --- | | branch | String, Reference | the branch to checkout | | opts | Object, CheckoutOptions | the options to use for the checkout |
repository.checkoutRef(reference, opts).then(function() {
// method complete});This will set the HEAD to point to the reference and then attempt to update the index and working tree to match the content of the latest commit on that reference
| Parameters | Type | | --- | --- | --- | | reference | Reference | the reference to checkout | | opts | Object, CheckoutOptions | the options to use for the checkout |
repository.cleanup().then(function() {
// method complete});var string = repository.commondir();| Returns | |
|---|---|
| String | the path to the common dir |
repository.config().then(function(config) {
// Use config
});| Returns | |
|---|---|
| Config |
repository.continueRebase(signature, beforeNextFn, beforeFinishFn, rebaseOptions).then(function(oid) {
// Use oid
});Continues an existing rebase
| Parameters | Type | | --- | --- | --- | | signature | Signature | Identity of the one performing the rebase | | beforeNextFn | Function | Callback to be called before each step of the rebase. If the callback returns a promise, the rebase will resume when the promise resolves. The rebase object is is passed to the callback. | | beforeFinishFn | Function | Callback called before the invocation of finish(). If the callback returns a promise, finish() will be called when the promise resolves. This callback will be provided a detailed overview of the rebase | | rebaseOptions | RebaseOptions | Options to initialize the rebase object with |
| Returns | |
|---|---|
| Oid | A commit id for a succesful merge or an index for a rebase with conflicts |
repository.createBlobFromBuffer(buffer).then(function(oid) {
// Use oid
});Create a blob from a buffer
| Parameters | Type | | --- | --- | --- | | buffer | Buffer | |
| Returns | |
|---|---|
| Oid |
repository.createBranch(name, commit, force).then(function(reference) {
// Use reference
});Creates a branch with the passed in name pointing to the commit
| Parameters | Type | | --- | --- | --- | | name | String | Branch name, e.g. "master" | | commit | Commit, String, Oid | The commit the branch will point to | | force | Boolean | Overwrite branch if it exists |
| Returns | |
|---|---|
| Reference |
repository.createCommit(updateRef, author, committer, message, Tree, parents).then(function(oid) {
// Use oid
});Create a commit
| Parameters | Type | | --- | --- | --- | | updateRef | String | | | author | Signature | | | committer | Signature | | | message | String | | | Tree | Oid, String | | | parents | Array | |
| Returns | |
|---|---|
| Oid | The oid of the commit |
repository.createCommitBuffer(author, committer, message, treeOid, parents).then(function(string) {
// Use string
});Create a commit
| Parameters | Type | | --- | --- | --- | | author | Signature | | | committer | Signature | | | message | String | | | treeOid | Oid, String | | | parents | Array | |
| Returns | |
|---|---|
| String | The content of the commit object as a string |
repository.createCommitOnHead(filesToAdd, author, committer, message).then(function(oid) {
// Use oid
});Creates a new commit on HEAD from the list of passed in files
| Parameters | Type | | --- | --- | --- | | filesToAdd | Array | | | author | Signature | | | committer | Signature | | | message | String | |
| Returns | |
|---|---|
| Oid | The oid of the new commit |
repository.createCommitWithSignature(updateRef, author, committer, message, Tree, parents, onSignature).then(function(oid) {
// Use oid
});Create a commit that is digitally signed
| Parameters | Type | | --- | --- | --- | | updateRef | String | | | author | Signature | | | committer | Signature | | | message | String | | | Tree | Tree, Oid, String | | | parents | Array | | | onSignature | Function | Callback to be called with string to be signed |
| Returns | |
|---|---|
| Oid | The oid of the commit |
repository.createLightweightTag(String, name).then(function(reference) {
// Use reference
});Creates a new lightweight tag
| Parameters | Type | | --- | --- | --- | | String | String, Oid | sha or Oid | | name | String | the name of the tag |
| Returns | |
|---|---|
| Reference |
var revwalk = repository.createRevWalk();Instantiate a new revision walker for browsing the Repository"s history.
See also Commit.prototype.history()
| Returns | |
|---|---|
| Revwalk |
repository.createTag(String, name, message).then(function(tag) {
// Use tag
});Creates a new annotated tag
| Parameters | Type | | --- | --- | --- | | String | String, Oid | sha or Oid | | name | String | the name of the tag | | message | String | the description that will be attached to the annotated tag |
| Returns | |
|---|---|
| Tag |
repository.defaultSignature().then(function(signature) {
// Use signature
});Gets the default signature for the default user and now timestamp
| Returns | |
|---|---|
| Signature |
repository.deleteTagByName(Short).then(function() {
// method complete});Deletes a tag from a repository by the tag name.
| Parameters | Type | | --- | --- | --- | | Short | String | or full tag name |
var result = repository.detachHead();| Returns | |
|---|---|
| Number | 0 on success, GIT_EUNBORNBRANCH when HEAD points to a non existing |
| branch or an error code |
repository.fetch(remote, fetchOptions).then(function() {
// method complete});Fetches from a remote
| Parameters | Type | | --- | --- | --- | | remote | String, Remote | | | fetchOptions | Object, FetchOptions | Options for the fetch, includes callbacks for fetching |
repository.fetchAll(fetchOptions, callback).then(function() {
// method complete});Fetches from all remotes. This is done in series due to deadlocking issues with fetching from many remotes that can happen.
| Parameters | Type | | --- | --- | --- | | fetchOptions | Object, FetchOptions | Options for the fetch, includes callbacks for fetching | | callback | Function | |
repository.fetchheadForeach(callback).then(function() {
// method complete});| Parameters | Type | | --- | --- | --- | | callback | FetchheadForeachCb | The callback function to be called on each entry |
repository.getBlob(String).then(function(blob) {
// Use blob
});Retrieve the blob represented by the oid.
| Parameters | Type | | --- | --- | --- | | String | String, Oid | sha or Oid |
| Returns | |
|---|---|
| Blob |
repository.getBranch(name).then(function(reference) {
// Use reference
});Look up a branch. Alias for getReference
| Parameters | Type | | --- | --- | --- | | name | String, Reference | Ref name, e.g. "master", "refs/heads/master" or Branch Ref |
| Returns | |
|---|---|
| Reference |
repository.getBranchCommit(name).then(function(commit) {
// Use commit
});Look up a branch's most recent commit. Alias to getReferenceCommit
| Parameters | Type | | --- | --- | --- | | name | String, Reference | Ref name, e.g. "master", "refs/heads/master" or Branch Ref |
| Returns | |
|---|---|
| Commit |
repository.getCommit(String).then(function(commit) {
// Use commit
});Retrieve the commit identified by oid.
| Parameters | Type | | --- | --- | --- | | String | String, Oid | sha or Oid |
| Returns | |
|---|---|
| Commit |
repository.getCurrentBranch().then(function(reference) {
// Use reference
});Gets the branch that HEAD currently points to Is an alias to head()
| Returns | |
|---|---|
| Reference |
repository.getHeadCommit().then(function(commit) {
// Use commit
});Retrieve the commit that HEAD is currently pointing to
| Returns | |
|---|---|
| Commit |
repository.getMasterCommit().then(function(commit) {
// Use commit
});Retrieve the master branch commit.
| Returns | |
|---|---|
| Commit |
var string = repository.getNamespace();| Returns | |
|---|---|
| String | the active namespace, or NULL if there isn't one |
repository.getReference(name).then(function(reference) {
// Use reference
});Lookup the reference with the given name.
| Parameters | Type | | --- | --- | --- | | name | String, Reference | Ref name, e.g. "master", "refs/heads/master" or Branch Ref |
| Returns | |
|---|---|
| Reference |
repository.getReferenceCommit(name).then(function(commit) {
// Use commit
});Look up a refs's commit.
| Parameters | Type | | --- | --- | --- | | name | String, Reference | Ref name, e.g. "master", "refs/heads/master" or Branch Ref |
| Returns | |
|---|---|
| Commit |
repository.getReferenceNames(type).then(function(arrayString) {
// Use arrayString
});Lookup reference names for a repository.
| Parameters | Type | | --- | --- | --- | | type | Reference.TYPE | Type of reference to look up |
| Returns | |
|---|---|
| Array<String> |
repository.getReferences().then(function(stdVectorGitReference) {
// Use stdVectorGitReference
});| Returns | |
|---|---|
| StdVectorGitReference |
repository.getRemote(remote, callback).then(function(remote) {
// Use remote
});Gets a remote from the repo
| Parameters | Type | | --- | --- | --- | | remote | String, Remote | | | callback | Function | |
| Returns | |
|---|---|
| Remote | The remote object |
repository.getRemoteNames(Optional).then(function(object) {
// Use object
});Lists out the remotes in the given repository.
| Parameters | Type | | --- | --- | --- | | Optional | Function | callback |
| Returns | |
|---|---|
| Object | Promise object. |
repository.getRemotes().then(function(stdVectorGitRemote) {
// Use stdVectorGitRemote
});| Returns | |
|---|---|
| StdVectorGitRemote |
repository.getStatus(opts).then(function(arrayStatusFile) {
// Use arrayStatusFile
});Get the status of a repo to it's working directory
| Parameters | Type | | --- | --- | --- | | opts | obj | |
| Returns | |
|---|---|
| Array<StatusFile> |
repository.getStatusExt(opts).then(function(arrayStatusFile) {
// Use arrayStatusFile
});Get extended statuses of a repo to it's working directory. Status entries
have status, headToIndex delta, and indexToWorkdir deltas
| Parameters | Type | | --- | --- | --- | | opts | obj | |
| Returns | |
|---|---|
| Array<StatusFile> |
repository.getSubmoduleNames().then(function(arrayString) {
// Use arrayString
});Get the names of the submodules in the repository.
| Returns | |
|---|---|
| Array<String> |
repository.getSubmodules().then(function(stdVectorGitSubmodule) {
// Use stdVectorGitSubmodule
});| Returns | |
|---|---|
| StdVectorGitSubmodule |
repository.getTag(String).then(function(tag) {
// Use tag
});Retrieve the tag represented by the oid.
| Parameters | Type | | --- | --- | --- | | String | String, Oid | sha or Oid |
| Returns | |
|---|---|
| Tag |
repository.getTagByName(Short).then(function(tag) {
// Use tag
});Retrieve the tag represented by the tag name.
| Parameters | Type | | --- | --- | --- | | Short | String | or full tag name |
| Returns | |
|---|---|
| Tag |
repository.getTree(String).then(function(tree) {
// Use tree
});Retrieve the tree represented by the oid.
| Parameters | Type | | --- | --- | --- | | String | String, Oid | sha or Oid |
| Returns | |
|---|---|
| Tree |
repository.head().then(function(reference) {
// Use reference
});| Returns | |
|---|---|
| Reference |
var result = repository.headDetached();| Returns | |
|---|---|
| Number | 1 if HEAD is detached, 0 if it's not; error code if there |
| was an error. |
var result = repository.headDetachedForWorktree(name);| Parameters | Type | | --- | --- | --- | | name | String | name of the worktree to retrieve HEAD for |
| Returns | |
|---|---|
| Number | 1 if HEAD is detached, 0 if its not; error code if |
| there was an error |
repository.headForWorktree(name).then(function(reference) {
// Use reference
});| Parameters | Type | | --- | --- | --- | | name | String | name of the worktree to retrieve HEAD for |
| Returns | |
|---|---|
| Reference |
var result = repository.headUnborn();| Returns | |
|---|---|
| Number | 1 if the current branch is unborn, 0 if it's not; error |
| code if there was an error |
var string = repository.ident();| Returns | |
|---|---|
| String |
repository.index().then(function(index) {
// Use index
});| Returns | |
|---|---|
| Index |
var boolean = repository.isApplyingMailbox();Returns true if the repository is in the APPLY_MAILBOX or APPLY_MAILBOX_OR_REBASE state.
| Returns | |
|---|---|
| Boolean |
var result = repository.isBare();| Returns | |
|---|---|
| Number | 1 if the repository is bare, 0 otherwise. |
var boolean = repository.isBisecting();Returns true if the repository is in the BISECT state.
| Returns | |
|---|---|
| Boolean |
var boolean = repository.isCherrypicking();Returns true if the repository is in the CHERRYPICK state.
| Returns | |
|---|---|
| Boolean |
var boolean = repository.isDefaultState();Returns true if the repository is in the default NONE state.
| Returns | |
|---|---|
| Boolean |
var result = repository.isEmpty();| Returns | |
|---|---|
| Number | 1 if the repository is empty, 0 if it isn't, error code |
| if the repository is corrupted |
var boolean = repository.isMerging();Returns true if the repository is in the MERGE state.
| Returns | |
|---|---|
| Boolean |
var boolean = repository.isRebasing();Returns true if the repository is in the REBASE, REBASE_INTERACTIVE, or REBASE_MERGE state.
| Returns | |
|---|---|
| Boolean |
var boolean = repository.isReverting();Returns true if the repository is in the REVERT state.
| Returns | |
|---|---|
| Boolean |
var result = repository.isShallow();| Returns | |
|---|---|
| Number | 1 if shallow, zero if not |
var result = repository.isWorktree();| Returns | |
|---|---|
| Number | 1 if the repository is a linked work tree, 0 otherwise. |
repository.itemPath(item).then(function(buf) {
// Use buf
});| Parameters | Type | | --- | --- | --- | | item | Number | The repository item for which to retrieve the path |
| Returns | |
|---|---|
| Buf | Buffer to store the path at |
repository.mergeBranches(to, from, signature, mergePreference, mergeOptions, mergeBranchOptions).then(function(oid) {
// Use oid
});Merge a branch onto another branch
| Parameters | Type | | --- | --- | --- | | to | String, Reference | | | from | String, Reference | | | signature | Signature | | | mergePreference | Merge.PREFERENCE | | | mergeOptions | MergeOptions | | | mergeBranchOptions | MergeBranchOptions | |
| Returns | |
|---|---|
| Oid | A commit id for a succesful merge or an index for a merge with conflicts |
repository.mergeheadForeach(callback).then(function() {
// method complete});| Parameters | Type | | --- | --- | --- | | callback | MergeheadForeachCb | The callback function to be called on each entry |
var result = repository.messageRemove();| Returns | |
|---|---|
| Number |
repository.odb().then(function(odb) {
// Use odb
});| Returns | |
|---|---|
| Odb |
var string = repository.path();| Returns | |
|---|---|
| String | the path to the repository |
repository.rebaseBranches(branch, upstream, onto, signature, beforeNextFn, beforeFinishFn, rebaseOptions).then(function(oid) {
// Use oid
});Rebases a branch onto another branch
| Parameters | Type | | --- | --- | --- | | branch | String | | | upstream | String | | | onto | String | | | signature | Signature | Identity of the one performing the rebase | | beforeNextFn | Function | Callback to be called before each step of the rebase. If the callback returns a promise, the rebase will resume when the promise resolves. The rebase object is is passed to the callback. | | beforeFinishFn | Function | Callback called before the invocation of finish(). If the callback returns a promise, finish() will be called when the promise resolves. This callback will be provided a detailed overview of the rebase | | rebaseOptions | RebaseOptions | Options to initialize the rebase object with |
| Returns | |
|---|---|
| Oid | A commit id for a succesful merge or an index for a rebase with conflicts |
repository.refdb().then(function(refdb) {
// Use refdb
});| Returns | |
|---|---|
| Refdb |
repository.refreshIndex().then(function(index) {
// Use index
});Grabs a fresh copy of the index from the repository. Invalidates all previously grabbed indexes
| Returns | |
|---|---|
| Index |
repository.refreshReferences().then(function() {
// method complete});repository.setHead(refname).then(function(result) {
// Use result
});| Parameters | Type | | --- | --- | --- | | refname | String | Canonical name of the reference the HEAD should point at |
| Returns | |
|---|---|
| Number | 0 on success, or an error code |
var result = repository.setHeadDetached(commitish);| Parameters | Type | | --- | --- | --- | | commitish | Oid | Object id of the Commit the HEAD should point to |
| Returns | |
|---|---|
| Number | 0 on success, or an error code |
var result = repository.setHeadDetachedFromAnnotated(commitish);| Parameters | Type | | --- | --- | --- | | commitish | AnnotatedCommit | |
| Returns | |
|---|---|
| Number |
var result = repository.setIdent(name, email);| Parameters | Type | | --- | --- | --- | | name | String | the name to use for the reflog entries | | email | String | the email to use for the reflog entries |
| Returns | |
|---|---|
| Number |
repository.setIndex(index);| Parameters | Type | | --- | --- | --- | | index | Index | |
var result = repository.setNamespace(nmspace);| Parameters | Type |
| --- | --- | --- |
| nmspace | String | The namespace. This should not include the refs folder, e.g. to namespace all references under refs/namespaces/foo/, use foo as the namespace. |
| Returns | |
|---|---|
| Number | 0 on success, -1 on error |
var result = repository.setWorkdir(workdir, update_gitlink);| Parameters | Type | | --- | --- | --- | | workdir | String | The path to a working directory | | update_gitlink | Number | Create/update gitlink in workdir and set config "core.worktree" (if workdir is not the parent of the .git directory) |
| Returns | |
|---|---|
| Number | 0, or an error code |
repository.stageFilemode(filePath, stageNew).then(function(number) {
// Use number
});Stages or unstages line selection of a specified file
| Parameters | Type | | --- | --- | --- | | filePath | String, Array | The relative path of this file in the repo | | stageNew | Boolean | Set to stage new filemode. Unset to unstage. |
| Returns | |
|---|---|
| Number | 0 or an error code |
repository.stageLines(filePath, selectedLines, isStaged).then(function(number) {
// Use number
});Stages or unstages line selection of a specified file
| Parameters | Type | | --- | --- | --- | | filePath | String | The relative path of this file in the repo | | selectedLines | Array | The array of DiffLine objects selected for staging or unstaging | | isStaged | Boolean | Are the selected lines currently staged |
| Returns | |
|---|---|
| Number | 0 or an error code |
var result = repository.state();| Returns | |
|---|---|
| Number | The state of the repository |
var result = repository.stateCleanup();| Returns | |
|---|---|
| Number | 0 on success, or error |
var result = repository.submoduleCacheAll();| Returns | |
|---|---|
| Number |
var result = repository.submoduleCacheClear();| Returns | |
|---|---|
| Number |
repository.treeBuilder(tree);Create a new tree builder.
| Parameters | Type | | --- | --- | --- | | tree | Tree | |
var string = repository.workdir();| Returns | |
|---|---|
| String | the path to the working dir, if it exists |
| Flag | Value | | --- | --- | --- | | Repository.INIT_FLAG.BARE | 1 | | Repository.INIT_FLAG.NO_REINIT | 2 | | Repository.INIT_FLAG.NO_DOTGIT_DIR | 4 | | Repository.INIT_FLAG.MKDIR | 8 | | Repository.INIT_FLAG.MKPATH | 16 | | Repository.INIT_FLAG.EXTERNAL_TEMPLATE | 32 | | Repository.INIT_FLAG.RELATIVE_GITLINK | 64 |
| Flag | Value | | --- | --- | --- | | Repository.INIT_MODE.INIT_SHARED_UMASK | 0 | | Repository.INIT_MODE.INIT_SHARED_GROUP | 1533 | | Repository.INIT_MODE.INIT_SHARED_ALL | 1535 |
| Flag | Value | | --- | --- | --- | | Repository.ITEM.GITDIR | 0 | | Repository.ITEM.WORKDIR | 1 | | Repository.ITEM.COMMONDIR | 2 | | Repository.ITEM.INDEX | 3 | | Repository.ITEM.OBJECTS | 4 | | Repository.ITEM.REFS | 5 | | Repository.ITEM.PACKED_REFS | 6 | | Repository.ITEM.REMOTES | 7 | | Repository.ITEM.CONFIG | 8 | | Repository.ITEM.INFO | 9 | | Repository.ITEM.HOOKS | 10 | | Repository.ITEM.LOGS | 11 | | Repository.ITEM.MODULES | 12 | | Repository.ITEM.WORKTREES | 13 | | Repository.ITEM._LAST | 14 |
| Flag | Value | | --- | --- | --- | | Repository.OPEN_FLAG.OPEN_NO_SEARCH | 1 | | Repository.OPEN_FLAG.OPEN_CROSS_FS | 2 | | Repository.OPEN_FLAG.OPEN_BARE | 4 | | Repository.OPEN_FLAG.OPEN_NO_DOTGIT | 8 | | Repository.OPEN_FLAG.OPEN_FROM_ENV | 16 |
| Flag | Value | | --- | --- | --- | | Repository.STATE.NONE | 0 | | Repository.STATE.MERGE | 1 | | Repository.STATE.REVERT | 2 | | Repository.STATE.REVERT_SEQUENCE | 3 | | Repository.STATE.CHERRYPICK | 4 | | Repository.STATE.CHERRYPICK_SEQUENCE | 5 | | Repository.STATE.BISECT | 6 | | Repository.STATE.REBASE | 7 | | Repository.STATE.REBASE_INTERACTIVE | 8 | | Repository.STATE.REBASE_MERGE | 9 | | Repository.STATE.APPLY_MAILBOX | 10 | | Repository.STATE.APPLY_MAILBOX_OR_REBASE | 11 |