Skip to main content
Jump to: navigation, search

Difference between revisions of "JGit/New and Noteworthy/3.0"

Line 36: Line 36:
* If <tt>core.autocrlf</tt> = <tt>true</tt> then any 8000 byte file checks out as zero byte file [[ bug 405672]]
* If <tt>core.autocrlf</tt> = <tt>true</tt> then any 8000 byte file checks out as zero byte file [[ bug 405672]]
* NPE in <tt>DiffFormatter</tt> when DiffEntry.oldId is null [[ bug 407743]]
* NPE in <tt>DiffFormatter</tt> when DiffEntry.oldId is null [[ bug 407743]]
* Basic Java 7 support API [[ change I3d6580d6]]. Internally only (read: symlink support not visisble)
=Command Line=
=Command Line=

Revision as of 18:53, 21 May 2013


Recursive Merge

JGit now supports the "recursive" merge strategy and it's the default for merge/pull (bug 380314). It is based on the "resolve" strategy but can handle more than one merge base. See merge strategies in the Git documentation for a description.

Java 7


Added org.eclipse.jgit.java7 artifact (and p2 feature) for taking advantage of Java 7 for things like symlink support.


(not to be confused with Command Line below)

  • Add NameRevCommand for describing IDs in terms of refnames (change I92bfb47).
  • Add ArchiveCommand for creating an archive file for a tree
  • TagCommand now also supports creating simple unannotated (lightweight) tags (bug 349223).
  • RebaseCommand supports aborting a non-interactive rebase started from C Git (bug 336820).
  • MergeCommand now has a setCommit(boolean) method which can be used to merge but not yet commit the result (bug 335091).
  • StashCreateCommand considers working tree changes when stashing newly added files (bug 402396).
  • StashCreateCommand no longer stashes untracked files (bug 403282).


  • Add isRebasing to RepositoryState for checking whether the repository is in a rebasing state.
  • Don't verify host name when http.sslVerify is set to false (change I42f509f).
  • Allow to provide OutputStream for push so that server messages can be written to it while they're coming in (bug 398404).
  • IndexDiff provides stage information for conflicting entries, e.g. BOTH_MODIFIED (bug 403697).
  • Behave more like C Git when fetching tags by not updating existing tags unless explicitly specified (bug 388095).
  • Delete errors on Windows [bug 403685]
  • Rebase/Cherry pick fails because/when new directory already exists [bug 402834]
  • Amend of merge commit reverses parent order [bug 392670]
  • TreeFilter does not work if one folder name is a prefix of another folder [bug 362430]
  • If core.autocrlf = true then any 8000 byte file checks out as zero byte file [bug 405672]
  • NPE in DiffFormatter when DiffEntry.oldId is null [bug 407743]
  • Basic Java 7 support API [change I3d6580d6]. Internally only (read: symlink support not visisble)

Command Line

  • Clone command
    • Added --branch (-b) option for checking out a specific branch instead of HEAD in non-bare repository
  • Merge command
    • Add --no-commit option for merging but not committing the result
  • Status command
    • Show conflict description for unmerged paths (e.g. "both modified")

Performance Improvements

  • DateRevQueue (used by RevWalk) is faster for many commits (change Ie7b99f4).
  • When using both Git and JGit and core.checkstat is set to minimal, Git no longer has to revalidate a large number of files (change I8eaff18).
  • Updating many existing refs is faster as the unnecessary check for ref name conflicts is no longer done (change I9057bc4).
  • Speed up clone/fetch with large number of refs (change I17d0b3c).
  • Various improvements to packing/delta compression

TODO: bitmap index stuff, more?

API Changes and Migration Hints

Details of API changes in 3.0 compared to the previous release 2.3.1 are available in the Clirr API change report

(TODO: adapt link when release is available)

Internal storage API moved to internal packages

Applications are not supposed to build against the internal storage API unless they can accept API churn and make necessary updates as versions change.

  • package was moved to
  • package was moved to

In order to construct specific Repository instances use the respective builder classes:


WindowCache reconfiguration

Instead of

WindowCacheConfig c = new WindowCacheConfig();
... set new configuration params ...


WindowCacheConfig c = new WindowCacheConfig();
... set new configuration params ...

FollowFilter requires DiffConfig

Creation of a FollowFilter now needs an explicit DiffConfig, this was necessary to fix an NPE (see

public static FollowFilter create(String path, DiffConfig cfg)

TODO: Reflog?

Bug Fixes

XX Bugs and XX enhancement requests were closed


The following X developers worked on this release of JGit:


Back to the top