Skip navigation links

Introduction

This document lists changes made to the Git Library API.


Index of APIs

Incompatible changes by date

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.

All changes by date

Changes by version

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

Changes by affected class

org.netbeans.libs.git.GitCherryPickResult

org.netbeans.libs.git.GitClient

org.netbeans.libs.git.GitMergeResult

org.netbeans.libs.git.GitRebaseResult

org.netbeans.libs.git.GitRepository

org.netbeans.libs.git.GitRepositoryState

org.netbeans.libs.git.GitRevisionInfo

org.netbeans.libs.git.GitStatus

org.netbeans.libs.git.GitSubmoduleStatus

org.netbeans.libs.git.progress.ProgressMonitor

org.netbeans.libs.git.jgit.commands.PushCommand


Details of all changes by API and date


Git Library

Enable forced pushing for branches

Nov 11 '23; API spec. version: 1.58; affected top-level classes: org.netbeans.libs.git.jgit.commands.PushCommand; made by: matthiasblaesing

API for git stash support.

Dec 19 '14; API spec. version: 1.31; affected top-level classes: GitClient; made by: ovrabec; issues: #249326

Passing messages from running commands to the caller.

Dec 11 '14; API spec. version: 1.30; affected top-level classes: ProgressMonitor; made by: ovrabec; issues: #233106

New method exporting a diff between two arbitrary commits or trees.

Oct 27 '14; API spec. version: 1.29; affected top-level classes: GitClient; made by: ovrabec; issues: #248002

New method for updating a reference (branch) to a new commit id.

Jul 1 '14; API spec. version: 1.27; affected top-level classes: GitClient GitCherryPickResult GitRepositoryState; made by: ovrabec; issues: #235267

New method for updating a reference (branch) to a new commit id.

Jun 25 '14; API spec. version: 1.26; affected top-level classes: GitRepository GitClient GitMergeResult; made by: ovrabec; issues: #245236

New method for updating a reference (branch) to a new commit id.

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).

New methods in ProgressMonitor informing about the progress of command's subtasks.

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.

File status provides also information about the last index entry modification timestamp.

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.

The log command returns also branches containing the commits from the result.

Oct 31 '13; API spec. version: 1.16; affected top-level classes: GitClient GitSubmoduleStatus; made by: ovrabec; issues: #237621

The log command returns also branches containing the commits from the result.

Sep 25 '13; API spec. version: 1.14; affected top-level classes: GitClient GitRevisionInfo; made by: ovrabec; issues: #235882

Adding a command setting the upstream branch/tracking of local branches

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.

Adding support comparing trees of arbitrary commits

Mar 12 '13; API spec. version: 1.9; affected top-level classes: GitClient; made by: ovrabec; issues: #227348

Adding support for rebase to the API

Mar 11 '13; API spec. version: 1.8; affected top-level classes: GitClient GitRebaseResult; made by: ovrabec; issues: #226545

Adding new method to GitClient: commit(), amending the last commit

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.

Adding new method to GitClient: release()

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.

Initial version of the API

Mar 11 '12; API spec. version: 1.0; made by: ovrabec