Eclipse JGit: Java implementation of Git 4.3 Release Review

End Date of the Review Period

Reviews run for a minimum of one week. The outcome of the review is decided on this date. This is the last day to make comments or ask questions about this review.




Git attributes support

Implement git attributes support for

  • text attributes
  • eol attributes
  • macros
  • binary macro

Large File Storage (LFS) Extension

Git Large File Storage (LFS) is a Git extension for versioning large files

LFS replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote LFS server.


In 4.3 the following features to support LFS in JGit were implemented

  • SHA-256 abstraction
  • command line command debug-lfs-store to run LFS test server
  • LFS server: support LFS protocol and a file system based LFS storage (used in Gerrit lfs-storage-fs plugin)
  • LFS server: support Amazon S3 based storage for LFS (used in Gerrit lfs-storage-s3 plugin)
  • fix FileLfsRepository to make it thread safe


RefTree enables JGit to version refs (branches, tags and symbolic refs) in a Git tree and enables atomic push which is a precondition to implement Git Ketch.


A group of updates can be applied by updating the tree in one step, writing out a new root tree, and storing its SHA-1. If references are stored in RefTrees, comparing two repositories is a matter of checking if two SHA-1s are identical. Without RefTrees comparing two repositories requires listing all references and comparing the sets.


Track the "refs/" directory as a root tree by storing references that point directly at an object as a GITLINK entry in the tree. For example "refs/heads/master" is written as "heads/master".


Annotated tags also store their peeled value with ^{} suffix, using "tags/v1.0" and "tags/v1.0^{}" GITLINK entries.


Symbolic references are written as SYMLINK entries with the blob of the symlink carrying the name of the symbolic reference target.


HEAD is outside of "refs/" namespace so it is stored as a special "..HEAD" entry.

  • debug-rebuild-ref-tree command line command to migrate refs to RefTreeDatabase
  • copy HEAD into RefTree
  • RefTreeDatabase: Allow ORIG_HEAD, etc. on non-bare repositories
  • RefTreeDatabase: Expose bootstrap refs in getAdditionalRefs

Git Ketch

Git Ketch is a multi-master Git repository management system.  Writes are successful only if a majority of participant servers agree. Acknowledged writes are durable against server failures as a majority of the participants store all required objects.


Git Ketch is modeled on the Raft Consensus Algorithm.  A ketch sailing vessel is faster and more nimble than a raft.  It can also carry more source codes. Git Ketch front-loads replication costs, which vaguely resembles a ketch sailing vessel's distinguishing feature of the main mast on the front of the ship.


In 4.3 the following Ketch features were implemented

  • basic replication system
  • simple map of running leader instances
  • intercept push and route it through Ketch
  • daemon: Add --ketch=LEADER flag

Repo command

  • add ignoreRemoteFailures option to RepoCommand
  • support revision in remote tag


  • implement configuration option DIR_NO_GITLINKS

Build and Release Engineering

  • Enable building JGit and Gerrit in the same Buck build to speed up build for features spanning JGit and Gerrit