Package | Description |
---|---|
org.netbeans.libs.git |
Modifier and Type | Class and Description |
---|---|
static class |
GitException.AuthorizationException
Thrown when an authentication or authorization to a remote repository fails because of
incorrect credentials.
|
static class |
GitException.CheckoutConflictException
Thrown when a file cannot be checked out into the working tree because it would result in a local conflict.
|
static class |
GitException.MissingObjectException
Describes an error when a non existent git object is tried to be loaded.
|
static class |
GitException.NotMergedException
Thrown to notify a caller of the fact that a revision he passed has not been
fully merged into a current HEAD yet.
|
static class |
GitException.RefUpdateException |
Modifier and Type | Method and Description |
---|---|
void |
GitClient.add(File[] roots,
ProgressMonitor monitor)
Adds all files under the given roots to the index
|
GitBlameResult |
GitClient.blame(File file,
String revision,
ProgressMonitor monitor)
Annotates lines of a given file in a given revision and returns the result
with annotate information.
|
boolean |
GitClient.catFile(File file,
String revision,
OutputStream out,
ProgressMonitor monitor)
Prints file's content in the given revision to output stream
|
boolean |
GitClient.catIndexEntry(File file,
int stage,
OutputStream out,
ProgressMonitor monitor)
Prints content of an index entry accordant to the given file to the given output stream
|
void |
GitClient.checkout(File[] roots,
String revision,
boolean recursively,
ProgressMonitor monitor)
Checks out the index into the working copy root.
|
void |
GitClient.checkoutRevision(String revision,
boolean failOnConflict,
ProgressMonitor monitor)
Checks out a given revision, modifies the Index as well as the Working tree.
|
GitCherryPickResult |
GitClient.cherryPick(GitClient.CherryPickOperation operation,
String[] revisions,
ProgressMonitor monitor)
Cherry-picks (transplants) selected revisions (commits) onto the current
HEAD.
|
void |
GitClient.clean(File[] roots,
ProgressMonitor monitor)
Cleans the working tree by recursively removing files that are not under
version control starting from the given roots.
|
GitRevisionInfo |
GitClient.commit(File[] roots,
String commitMessage,
GitUser author,
GitUser commiter,
boolean amend,
ProgressMonitor monitor)
Commits all changes made in the index to all files under the given roots
|
GitRevisionInfo |
GitClient.commit(File[] roots,
String commitMessage,
GitUser author,
GitUser commiter,
ProgressMonitor monitor)
Commits all changes made in the index to all files under the given roots
|
void |
GitClient.copyAfter(File source,
File target,
ProgressMonitor monitor)
The index entries representing files under the source are copied and the newly created entries represent the corresponding files under the target.
|
GitBranch |
GitClient.createBranch(String branchName,
String revision,
ProgressMonitor monitor)
Creates a new branch with a given name, starting at the given revision
|
GitClient |
GitRepository.createClient()
Creates and returns always a new instance of git client bound to the local git repository.
|
GitTag |
GitClient.createTag(String tagName,
String taggedObject,
String message,
boolean signed,
boolean forceUpdate,
ProgressMonitor monitor)
Creates a tag for any object represented by a given taggedObjectId.
|
void |
GitClient.deleteBranch(String branchName,
boolean forceDeleteUnmerged,
ProgressMonitor monitor)
Deletes a given branch from the repository
|
void |
GitClient.deleteTag(String tagName,
ProgressMonitor monitor)
Deletes a given tag from the repository
|
void |
GitClient.exportCommit(String commit,
OutputStream out,
ProgressMonitor monitor)
Exports a given commit in the format accepted by git am
|
void |
GitClient.exportDiff(File[] roots,
GitClient.DiffMode mode,
OutputStream out,
ProgressMonitor monitor)
Exports uncommitted changes in files under given roots to the given output stream
|
void |
GitClient.exportDiff(File[] roots,
String commitBase,
String commitOther,
OutputStream out,
ProgressMonitor monitor)
Exports diff of changes between two trees identified by files and two
commit/revision identifiers.
|
Map<String,GitTransportUpdate> |
GitClient.fetch(String remote,
List<String> fetchRefSpecifications,
ProgressMonitor monitor)
Fetches remote changes from a remote repository for given reference specifications.
|
Map<String,GitTransportUpdate> |
GitClient.fetch(String remote,
ProgressMonitor monitor)
Fetches remote changes for references specified in the config file under a given remote.
|
Map<String,GitBranch> |
GitClient.getBranches(boolean all,
ProgressMonitor monitor)
Returns all known branches from the repository
|
GitRevisionInfo |
GitClient.getCommonAncestor(String[] revisions,
ProgressMonitor monitor)
Returns a common ancestor for given revisions or
null if none found. |
Map<File,GitStatus> |
GitClient.getConflicts(File[] roots,
ProgressMonitor monitor)
Similar to
GitClient.getStatus(java.io.File[], org.netbeans.libs.git.progress.ProgressMonitor) , but returns only conflicts. |
GitRepository.FastForwardOption |
GitRepository.getDefaultFastForwardOption()
Parses the repository configuration file and returns the default fast-forward merge
option set for the repository and its current branch.
|
Map<File,GitRevisionInfo.GitFileInfo> |
GitRevisionInfo.getModifiedFiles()
Returns the information about the files affected (modified, deleted or added) by this commit.
|
GitRevisionInfo |
GitClient.getPreviousRevision(File file,
String revision,
ProgressMonitor monitor)
Returns an ancestor revision that affected a given file
|
GitRemoteConfig |
GitClient.getRemote(String remoteName,
ProgressMonitor monitor)
Returns remote configuration set up for this repository identified by a given remoteName
|
Map<String,GitRemoteConfig> |
GitClient.getRemotes(ProgressMonitor monitor)
Returns all remote configurations set up for this repository
|
GitRepositoryState |
GitClient.getRepositoryState(ProgressMonitor monitor)
Returns the current state of the repository this client is associated with.
|
Map<File,GitStatus> |
GitClient.getStatus(File[] roots,
ProgressMonitor monitor)
Compares the working tree with the current HEAD and returns an array of
statuses for files under given roots
|
Map<File,GitStatus> |
GitClient.getStatus(File[] roots,
String revision,
ProgressMonitor monitor)
Compares working tree with a given revision and returns an array of
statuses for files under given roots
|
Map<File,GitRevisionInfo.GitFileInfo> |
GitClient.getStatus(File[] roots,
String revisionFirst,
String revisionSecond,
ProgressMonitor monitor)
Compares two different commit trees and returns an array of file
modifications between
revisionFirst and revisionSecond |
Map<File,GitSubmoduleStatus> |
GitClient.getSubmoduleStatus(File[] roots,
ProgressMonitor monitor)
Scans for any submodules under given roots or in the whole repository and
returns their status.
|
Map<String,GitTag> |
GitClient.getTags(ProgressMonitor monitor,
boolean allTags)
Returns all tags in the repository
|
GitUser |
GitClient.getUser()
Returns the user from this clients repository
|
File[] |
GitClient.ignore(File[] files,
ProgressMonitor monitor)
Ignores given files and add their path into gitignore file.
|
void |
GitClient.init(ProgressMonitor monitor)
Initializes an empty git repository in a folder specified in the constructor.
|
Map<File,GitSubmoduleStatus> |
GitClient.initializeSubmodules(File[] roots,
ProgressMonitor monitor)
Initializes submodules and registers them in .git/config file.
|
File[] |
GitClient.listModifiedIndexEntries(File[] roots,
ProgressMonitor monitor)
Returns files that are marked as modified between the HEAD and Index.
|
Map<String,GitBranch> |
GitClient.listRemoteBranches(String remoteRepositoryUrl,
ProgressMonitor monitor)
Returns available branches in a given remote repository
|
Map<String,String> |
GitClient.listRemoteTags(String remoteRepositoryUrl,
ProgressMonitor monitor)
Returns pairs tag name/id from a given remote repository
|
GitRevisionInfo[] |
GitClient.log(SearchCriteria searchCriteria,
boolean fetchBranchInfo,
ProgressMonitor monitor)
Digs through the repository's history and returns revisions according to
the given search criteria.
|
GitRevisionInfo[] |
GitClient.log(SearchCriteria searchCriteria,
ProgressMonitor monitor)
Digs through the repository's history and returns revisions according to the given search criteria.
|
GitRevisionInfo |
GitClient.log(String revision,
ProgressMonitor monitor)
Digs through the repository's history and returns the revision information belonging to the given revision string.
|
GitMergeResult |
GitClient.merge(String revision,
GitRepository.FastForwardOption fastForward,
ProgressMonitor monitor)
Merges a given revision with the current head.
|
GitMergeResult |
GitClient.merge(String revision,
ProgressMonitor monitor)
Merges a given revision with the current head.
|
GitPullResult |
GitClient.pull(String remote,
List<String> fetchRefSpecifications,
String branchToMerge,
ProgressMonitor monitor)
Pulls changes from a remote repository and merges a given remote branch to an active one.
|
GitPushResult |
GitClient.push(String remote,
List<String> pushRefSpecifications,
List<String> fetchRefSpecifications,
ProgressMonitor monitor)
Pushes changes to a remote repository specified by remote for given reference specifications.
|
GitRebaseResult |
GitClient.rebase(GitClient.RebaseOperationType operation,
String revision,
ProgressMonitor monitor)
Rebases the current HEAD onto a commit specified by the given revision.
|
void |
GitClient.remove(File[] roots,
boolean cached,
ProgressMonitor monitor)
Removes given files/folders from the index and/or from the working tree
|
void |
GitClient.removeRemote(String remote,
ProgressMonitor monitor)
Removes remote configuration from the repository's config file
|
void |
GitClient.rename(File source,
File target,
boolean after,
ProgressMonitor monitor)
Renames source file or folder to target
|
void |
GitClient.reset(File[] roots,
String revision,
boolean recursively,
ProgressMonitor monitor)
Updates entries for given files in the index with those from the given revision
|
void |
GitClient.reset(String revision,
GitClient.ResetType resetType,
ProgressMonitor monitor)
Sets HEAD to the given revision and updates index and working copy accordingly to the given reset type
|
GitRevertResult |
GitClient.revert(String revision,
String commitMessage,
boolean commit,
ProgressMonitor monitor)
Reverts already committed changes and creates an inverse commit.
|
void |
GitClient.setRemote(GitRemoteConfig remoteConfig,
ProgressMonitor monitor)
Sets the remote configuration in the configuration file.
|
GitBranch |
GitClient.setUpstreamBranch(String localBranchName,
String remoteBranch,
ProgressMonitor monitor)
Sets the upstream branch (tracking) of
localBranchName to
remoteBranch . |
void |
GitClient.stashApply(int stashIndex,
boolean dropStash,
ProgressMonitor monitor)
Applies a stashed commit identified by the given index to the current
working tree state
|
void |
GitClient.stashDrop(int stashIndex,
ProgressMonitor monitor)
Deletes the stashed commit identified by the given index (zero-based)
from the stash.
|
void |
GitClient.stashDropAll(ProgressMonitor monitor)
Drops (deletes) all stashed commits from the stash.
|
GitRevisionInfo[] |
GitClient.stashList(ProgressMonitor monitor)
Lists saved stashed commits.
|
GitRevisionInfo |
GitClient.stashSave(String message,
boolean includeUntracked,
ProgressMonitor monitor)
Saves local uncommitted changes to the git stash and resets the working
tree to the HEAD.
|
File[] |
GitClient.unignore(File[] files,
ProgressMonitor monitor)
Unignores given files
|
GitRefUpdateResult |
GitClient.updateReference(String referenceName,
String newId,
ProgressMonitor monitor)
Updates a given reference to a new id.
|
Map<File,GitSubmoduleStatus> |
GitClient.updateSubmodules(File[] roots,
ProgressMonitor monitor)
Updates submodules.
|