Breaking changes
- Update jakarta.servlet:jakarta.servlet-api to 6.1.0
- Update jetty to 12.0.12
- Update minimum Java version to 17
- Signing: refactor interfaces
This is a big API-breaking change cleaning up the signing interfaces.
Initially, these interfaces were GPG/OpenPGP-specific. When EGit added
new signers and signature verifiers that called an external GPG
executable, they were found inadequate and were extended to be able to
pass in the GpgConfig to get access to the "gpg.program" setting.
With the introduction of X.509 S/MIME signing, it was discovered that
the interfaces were still not quite adequate, and the "Gpg" prefix on
the class names were confusing.
Since 7.0 is a major version bump, we take this chance to overhaul
these interfaces from ground up.
For signing, there is a new Signer interface. With it goes a
SignerFactory SPI interface, and a final Signers class managing the
currently set signers. By default, signers for the different signature
types are created from the signer factories, which are discovered via
the ServiceLoader. External code can install its own signers, overriding
the default factories.
For signature verification, exactly the same mechanism is used.
This simplifies the setup of signers and signature verifiers, and makes
it all more regular. Signer instances just get a byte[] to sign and
don't have to worry about ObjectBuilders at all. SignatureVerifier
instances also just get the data and signature as byte[] and don't have
to worry about extracting the signature from a commit or tag, or about
what kind of signature it is.
Both Signers and SignatureVerifiers always get passed the Repository
and the GpgConfig. The repository will be needed in an implementation
for SSH signatures because gpg.ssh.* configs may need to be loaded
explicitly, and some of those values need the current workspace
location.
For signature verification, there is exactly one place in core JGit in
SignatureVerifiers that extracts signatures, determines the signature
type, and then calls the right signature verifier.
Change RevTag to recognize all signature types known in git (GPG, X509,
and SSH). - API cleanup:
- Remove deprecated JschSession#getSftpChannel method
- Remove deprecated AutoLFInputStream constructors
- Remove deprecated RawParseUtils#UTF8_CHARSET
- Remove deprecated FS#setAsyncFileStoreAttributes method
- FS, FS_Posix: remove deprecated #createNewFile(File) method
- Remove deprecated lastModified methods using long from
- FileUtils#lastModified
- FileUtils#setLastModified
- FS#getLastModifiedTime
- FS#lastModified
- FS#setLastModified
- FileTreeIterator.Entry#getEntryLastModified
- WorkingTreeIterator#getEntryLastModified
- WorkingTreeIterator.Entry#getEntryLastModified - UserAgent: remove deprecated #getAgent, #hasAgent methods
- Remove deprecated Transport#getFilterBlobLimit methods
- Remove deprecated RefAdvertiser#send(Map<String, Ref>) method
- Remove deprecated ReceivePack#setEchoCommandFailures method
- Remove deprecated class ReceivePack.FirstLine
- PacketLineIn: make deprecated #END and #DELIM private
- WindowCacheStats: remove deprecated #getOpenFiles, #getOpenBytes
- Remove deprecated PatchApplier#applyPatch(InputStream)
- Remove deprecated MergeMessageFormatter#formatWithConflicts
- Remove deprecated MergeFormatter#formatMerge using charset name
- Remove deprecated TagBuilder#toByteArray method
- Remove deprecated Repository#hasObject(AnyObjectId) method
- Make deprecated Repository#peel(Ref) private
- Remove deprecated RefDatabase#getRef(String) method
- CoreConfig: remove deprecated #isLogAllRefUpdates method
- Constants: remove deprecated #CHARSET and #CHARACTER_ENCODING
- Remove deprecated ConfigConstants#CONFIG_KEY_STREAM_FILE_TRESHOLD
- Remove deprecated CommitBuilder#setEncoding(String) method
- Remove deprecated static #equals(AnyObjectId, AnyObjectId) method
- Remove deprecated FileSnapshot.save(long) method
- Remove deprecated lastModified accessors returning long
- FileSnapshot#lastModified
- LockFile#getCommmitLastModified - Remove deprecated PackInvalidException constructors
- DirCacheEntry: remove deprecated methods
- boolean mightBeRacilyClean(int, int)
- long getLastModified()
- void setLastModified(long) - Remove deprecated DirCacheCheckout#checkoutEntry methods
- Remove deprecated StashApplyCommand#setApplyUntracked method
- Remove deprecated StashApplyCommand#setApplyIndex method
- Remove deprecated RemoteSetUrlCommand#setUri method
- Remove deprecated RemoteSetUrlCommand#setPush method
- Remove deprecated RemoteSetUrlCommand#setName method
- Remove deprecated RemoteRemoveCommand#setName method
- Remove deprecated CheckoutCommand#setForce method
- Remove deprecated static AnyLongObjectId#equals method
- walks: Remove deprecated #createReachabilityChecker() method
- RepoCommand.RemoteReader: Remove @Deprecated method
- ReachabilityChecker: Remove @Deprecated method
- UploadPack: Remove @Deprecated classes and methods
New Features
- Add worktrees read support
- ObjectId: Add method to read an ObjectId from a ByteBuffer
- DfsReaderIoStats: getters to object size index micros/bytes
- DfsPackFile: Abstract the loading of pack indexes
- DfsBlockCacheTable: extract stats get* methods to interface
- DfsPackFile: Enable/disable object size index via DfsReaderOptions
- DfsPackFile always uses the object size index if available. That is the desired final state, but for a safe rollout, we should be able to disable using the object size index. Add an option (dfs.useObjectSizeIndex) to enable/disable the usage of the object size index. False by default.
- DfsPackFile: Do not set primary index local ref from cache callback
- RepoProject: read the 'dest-branch' attribute of a project
- Make RepoProject#setUpstream public
- RepoCommand: Add error to ManifestErrorException, so callers can rely on #getMessage() to see what happens.
- RepoCommand: Copy manifest upstream into .gitmodules ref field
- RepoProject: read the "upstream" attribute of a project
- RepoProject: read the 'dest-branch' attribute of a project
- RepoCommand: Copy manifest upstream into .gitmodules ref field
Bug Fixes
- ObjectDirectoryTest: ensure WindowCursor is closed
- Do not try to set headers if HTTP response was already committed
- jgit-87 AmazonS3: Ensure SAXParserFactory sets valid/expected input params
- LockFile: Retry lock creation if parent dirs were removed
- Fix "Comparison of narrow type with wide type in loop condition"
- Fix ssh value for gpg.format throwing an IllegalArgumentException
Performance Improvements
- PackObjectSizeIndex: Read all bytes and use the byte[] directly
- PackExtBlockCacheTable: spread extensions over multiple dfs tables
- DfsBlockCacheConfig: support configurations for dfs cache tables per extensions
- CommitGraphWriter: use ANY_DIFF instead of idEquals inside next()
Build and Release Engineering
Update dependencies:
- jakarta.servlet:jakarta.servlet-api to 6.1.0
- org.apache.commons:commons-compress to 1.27.1
- org.tukaani:xz to 1.10
- org.assertj:assertj-core to 3.26.3
- org.apache.commons:commons-lang3 to 3.16.0
- bytebuddy to 1.15.0
- commons-logging:commons-logging to 1.3.4
- commons-codec:commons-codec to 1.17.1
- jakarta.servlet:jakarta.servlet-api to 6.1.0
- jetty to 12.0.12
- Apache MINA sshd to 2.13.2
Update build dependencies:
- tycho to 4.0.8
- org.eclipse.jdt.ecj to 3.38.0
- migrate to python 3
Misc
- Add 4.33 target platform for Eclipse 2024-09
- Bump japicmp base version to 6.10.0.202406032230-r
- Fix broken links to SCM and issue tracker in pom.xml