Introduction
This document lists changes made to the Git Library API.
Fuller descriptions of all changes can be found below (follow links).
Not all deprecations are listed here, assuming that the deprecated
APIs continue to essentially work. For a full deprecation list, please
consult the
Javadoc.
These API specification versions may be used to indicate that a module
requires a certain API feature in order to function. For example, if you
see here a feature you need which is labelled 1.20, your
manifest should contain in its main attributes the line:
OpenIDE-Module-Module-Dependencies: org.netbeans.libs.git > 1.20
Dec 19 '14; API spec. version: 1.31; affected top-level classes: GitClient
; made by: ovrabec; issues:
#249326
- Adding few new GitClient's methods handling the git stash support.
The API supports creating and applying patches and deleting and listing saved patches.
Dec 11 '14; API spec. version: 1.30; affected top-level classes: ProgressMonitor
; made by: ovrabec; issues:
#233106
- ProgressMonitor now delivers also informational messages from running commands.
This is useful to obtain messages during e.g. push process when a remote repository
notifies about run push hooks.
Oct 27 '14; API spec. version: 1.29; affected top-level classes: GitClient
; made by: ovrabec; issues:
#248002
- Adding new variant of GitClient.exportDiff which works for any
two arbitrary commits. It is also possible to diff between a commit and the working tree
or the Index.
Jul 1 '14; API spec. version: 1.27; affected top-level classes: GitClient
GitCherryPickResult
GitRepositoryState
; made by: ovrabec; issues:
#235267
- New method GitClient.cherryPick used to cherry-pick commits and apply them in the
current branch. The command may interrupt its progress and require some user actions
(such as resolve conflicts or commit) and may be continued with different kinds
of operation types passed as its arguments.
- Introduciong new repository state: CHERRY_PICKING and CHERRY_PICKING_RESOLVED
marking the states of the repository when a cherry-picking is not finished or
it requires resolving conflicts.
Jun 25 '14; API spec. version: 1.26; affected top-level classes: GitRepository
GitClient
GitMergeResult
; made by: ovrabec; issues:
#245236
- Git client accepts the parameter telling the merge command how
to proceed with regard to fast-forward commits. Users may require
either to enforce or to completely eliminate (and always create a merge commit)
fast-forward merges.
- Git Repository instance allows users to query for the current default fast-forward
option via a new getter method.
Jun 23 '14; API spec. version: 1.24; affected top-level classes: GitClient
; made by: ovrabec; issues:
#245078
In order to simplify a trivial use-case of merging a remote branch into a local branch
not currently checked-out we're adding a new method able to update the local branch to
the new id. It is possible only if the branch requires a fast-forward merge (does not
contain any unpushed commits).
Mar 4 '14; API spec. version: 1.21; affected top-level classes: ProgressMonitor
; made by: ovrabec; issues:
#242370
When a long running git command is invoked it usually calls subtasks playing a smaller execution role
(e.g. counting remote objects and actual data fetching during fetch command). Git API is now able to pass
messages from these subtasks to an API client to let it update a progress bar and UI.
Feb 18 '14; API spec. version: 1.19; affected top-level classes: GitStatus
; made by: ovrabec; issues:
#241798
It may be useful to know when was the last time a file was updated in the index. GitStatus
now
provides this value via getIndexEntryModificationDate
.
Oct 31 '13; API spec. version: 1.16; affected top-level classes: GitClient
GitSubmoduleStatus
; made by: ovrabec; issues:
#237621
- Adding new methods to GitClient allowing users to check a submodule's status, initialize them
after a clone and update them to a commit relevant to the state in the parent repository.
- Adding a new class GitSubmoduleStatus wrapping information about a submodule.
Sep 25 '13; API spec. version: 1.14; affected top-level classes: GitClient
GitRevisionInfo
; made by: ovrabec; issues:
#235882
- Adding a new method GitClient.log (SearchCriteria, boolean, ProgressMonitor)
allowing an API client to specify if he wants to know what branches contain
the returned commits applying the search criteria. Such information can
be used to filter the resulted commits by branches without a need to restart
the command again.
- Adding a method GitRevisionInfo.getBranches() returning all branches
that are known to contain the commit.
Aug 22 '13; API spec. version: 1.12; affected top-level classes: GitClient
; made by: ovrabec; issues:
#234391
Adding a new method GitClient.setUpstreamBranch(String, String, ProgressMonitor)
allowing an API client to set the tracking/upstream branch for a local branch.
Mar 12 '13; API spec. version: 1.9; affected top-level classes: GitClient
; made by: ovrabec; issues:
#227348
- Adding a new method GitClient.getStatus(File[], String, ProgressMonitor)
allowing an API client to get statuses of local files not just against the HEAD but against
an arbitrary commit.
- Adding a new method GitClient.getStatus(File[], String, String, ProgressMonitor)
allowing an API client to get modifications from the Git history. It is similar to
GitRevisionInfo.getModifications but returns file statuses between two arbitrary commits
and not just a commit and its parent.
Mar 11 '13; API spec. version: 1.8; affected top-level classes: GitClient
GitRebaseResult
; made by: ovrabec; issues:
#226545
- Adding a new method GitClient.rebase delegating to the rebase command.
Feb 6 '13; API spec. version: 1.7; made by: ovrabec
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.
Nov 16 '12; API spec. version: 1.5; made by: ovrabec
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.
Mar 11 '12; API spec. version: 1.0; made by: ovrabec