The library is a facade over a java implementation of Git client - JGit. Because JGit does not provide a full-featured high-level API (on the level of whole git commands), this library groups the JGit low-level API into bigger pieces and exports the API in the form of full Git commandline commands (e.g. status, commit, checkout, reset, etc.). GitlibraryAPI Allows clients to work with local Git repositories and invoke a set of Git commands affecting a Git repository.
Git supports commit amendments, in other words modifying the last commit and changing its commit message or modified files. Another commit method allows API clients to specify either to amend the last commit or to make a fresh new commit on top of current HEAD.
JGit repository normally does not close all opened file descriptors and prevents external commands from working with the same repository. Clients of the JGit API are supposed to call JGitRepository.close() when they're done with the repository. We need to pass this method to the Git Library API so when clients are done with calling all required commands the library closes all descriptors and frees the git metadata files for other tools.
GitClientare provided by GitRepository.
GitRepositoryrepresents a concrete local Git repository and is always bound to a specific folder. The correct way to achieve this is to call
GitClientmapped to a Git command accepts an instance of
ProgressMonitoras a parameter. Through an instance of this class you can cancel a command, an implementation of such a command periodically calls isCanceled and interrupts its work if the method returns
Package org.netbeans.libs.git.progress offers
a set of listeners extending the NotificationListener interface which you can attach to an instance of
GitClient via addNotificationListener()
and through which you can closely monitor building of the result.
The sources for the module are in the NetBeans Mercurial repositories.
No additional setting is needed, direct dependency is enough.
Read more about the implementation in the answers to architecture questions.
Built on May 24 2013. | Portions Copyright 1997-2013 Oracle. All rights reserved.