summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [releng] Bump Bouncy Castle to 1.78Thomas Wolf2024-04-0919-97/+97
| | | | | | | | | | Update version in pom.xml; update target platforms; update bazel workspace. Also update the p2 repository; the Bouncy Castle bundle symbolic names have changed from plain "bc*" to "bc*-jdk18on". Change-Id: I07a5709c791f644d2247c76404a36ba7d0625a1c Signed-off-by: Thomas Wolf <twolf@apache.org>
* Merge changes Ib7e3e562,I9d1f641c,Ia50445b8Thomas Wolf2024-04-0912-83/+340
|\ | | | | | | | | | | | | * changes: [gpg] Remove obsolete import-package [gpg] Correct finding public keys from pubring.gpg [gpg] Fix reading ed25519 GPG keys
| * [gpg] Remove obsolete import-packageThomas Wolf2024-04-081-1/+0
| | | | | | | | | | Bug: jgit-46 Change-Id: Ib7e3e562ca7ef9a30dfb7a1198f729bb389a5208 Signed-off-by: Thomas Wolf <twolf@apache.org>
| * [gpg] Correct finding public keys from pubring.gpgThomas Wolf2024-04-085-56/+173
| | | | | | | | | | | | | | | | | | | | | | With a master key not enabled for signing, and a signing sub-key, key lookup went wrong in several ways and might not find a suitable key for signing or for signature verification. Fix the code so that it finds the sub-key, even if user.signingKey is specified not with a key ID but with an with an e-mail. (Sub-keys don't have user ids, those are attached only on the master key.) Change-Id: I9d1f641c49b173d4daffb3fd2e74f5aabd856e39 Signed-off-by: Thomas Wolf <twolf@apache.org>
| * [gpg] Fix reading ed25519 GPG keysThomas Wolf2024-04-086-26/+167
| | | | | | | | | | | | | | | | | | | | | | | | The S-expression parser from Bouncy Castle parsed such keys wrongly; there is a "flags" sub-list before the "q" value. Additionally, the parser validates the key read against the given public key, this failed because Bouncy Castle does not know the OID of curve name "Ed25519". Fix this and add a test for reading an ed25519 GPG key. Bug: jgit-27 Change-Id: Ia50445b88759927d2e80b9871d498fbe5ad201bc Signed-off-by: Thomas Wolf <twolf@apache.org>
* | Merge "MergeAlgorithm: Fix diff3 conflict hunk computation"Ivan Frade2024-04-092-2/+24
|\ \ | |/ |/|
| * MergeAlgorithm: Fix diff3 conflict hunk computationAntonin Delpeuch2024-04-092-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes https://github.com/eclipse-jgit/jgit/issues/38. The previous code computed the boundaries of the base part of conflict hunks using line numbers computed for the 'ours' and 'theirs' revisions, leading to incorrect boundaries. This only affects the presentation of merge conflicts in diff3 mode (which is probably not used a lot yet on Gerrit). Successful merges are unaffected. Change-Id: I173c79bf5797896dc854791d6d05cb3f035726f4 Signed-off-by: Antonin Delpeuch <antonin@delpeuch.eu>
* | PackBitmapIndexBuilder: make StoredEntry constructor publicSam Delmerico2024-04-031-1/+15
| | | | | | | | | | | | This POD data structure can be used externally Change-Id: I464c45b93d0a56deaadbfe31df57a87e1054741c
* | Merge "PackBitmapIndexBuilder: allow repeated call of getCompressedBitmaps()"Ivan Frade2024-04-021-2/+3
|\ \
| * | PackBitmapIndexBuilder: allow repeated call of getCompressedBitmaps()Sam Delmerico2024-04-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each call of the current implementation of PackBitmapIndexBuilder.getCompressedBitmaps reverses the class member that is returned. So two subsequent calls of this function will receive reversed structures. Instead we should just reverse a copy of the structure. This way the PackBitmapIndexBuilder can continue to efficiently accept new bitmaps via processBitmapForWrite (because we can continue to add to the back of the bitmapsToWrite ArrayList) while ensuring that the bitmaps are returned in the correct ordering from getCompressedBitmaps. Change-Id: If7364222b9e62920c0c2c06894716fe85dd13315
* | | DfsPackFile: Make the loader classes used to construct bitmaps public.jackdt@google.com2024-04-021-7/+20
| | | | | | | | | | | | | | | | | | | | | This is necessary to swap out implementations of the PackBitmapIndex with custom implementations. Change-Id: Ia6f951bbc901446c255fa2902fab05d7ed974111
* | | DfsPackFile: make public the constructor with bitmap loaderIvan Frade2024-04-011-1/+12
|/ / | | | | | | | | | | | | | | | | | | The constructor with the bitmap loader as a parameter is supposed to be used from subclasses in the ObjectDatabase, but those subclasses cannot see it with its current package-private visibility. Make it public, so it can be used as intended. Change-Id: I4afca3d2a13c4a41a766d08c5aa54bde352915a6
* | PackWriter: writeBitmapIndex takes bitmap index writerSam Delmerico2024-03-296-22/+76
| | | | | | | | | | | | | | PackWriter.writeBitmapIndex now takes an interface which will perform the writing of the bitmap index to an arbitrary backing storage. Change-Id: Icba89321d56f7b652bbcbfcd5ed3ec74999cb8c4
* | PackBitmapIndex: convert from class to interfaceSam Delmerico2024-03-253-5/+5
| | | | | | | | | | | | | | | | | | This abstract class can be an interface after https://review.gerrithub.io/c/eclipse-jgit/jgit/+/1184614 moved the packChecksum data behind a getter interface. This also allows easier overriding of this interface with custom types. Change-Id: I89851de678e7ff896cc086455907e2898d2eecf6
* | Merge "DfsGarbageCollectorTest: add test for bitmap index creation"Ivan Frade2024-03-201-1/+67
|\ \
| * | DfsGarbageCollectorTest: add test for bitmap index creationSam Delmerico2024-03-181-1/+67
| | | | | | | | | | | | Change-Id: Ibb9b2f8fc0f5180728904f243bf372f8a233383d
* | | Merge "PackBitmapIndex: hide packChecksum behind getter"Ivan Frade2024-03-203-3/+16
|\| |
| * | PackBitmapIndex: hide packChecksum behind getterSam Delmerico2024-03-183-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | This allows more flexibility in overriding the PackBitmapIndex and also allows us to turn PackBitmapIndex into an interface in https://review.gerrithub.io/c/eclipse-jgit/jgit/+/1178201. Change-Id: I3be611fad67ff38b308c0052a04149f1497858ae
* | | Merge "Cache refreshed loose ref dirs in SnapshottingRefDirectory"Matthias Sohn2024-03-201-2/+26
|\ \ \
| * | | Cache refreshed loose ref dirs in SnapshottingRefDirectoryNasser Grainawi2024-03-191-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update SnapshottingRefDirectory to have a cache of dirs refreshed for loose refs. This should help improve performance when 'after_open' setting is used for 'trustLooseRefStat' as duplicate refreshes are avoided when a snapshot of the ref database is used in a request scope. Change-Id: I8f66e7cee572e477d29abe2d9db69e97bca3ee4c Signed-off-by: Nasser Grainawi <quic_nasserg@quicinc.com> Co-authored-by: Martin Fick <quic_mfick@quicinc.com> Co-authored-by: Kaushik Lingarkar <quic_kaushikl@quicinc.com>
* | | | Merge "TreeRevFilter: correct changedPathFilter usage for multi-paths inclusion"jonathantanmy2024-03-193-6/+33
|\ \ \ \ | |/ / / |/| | |
| * | | TreeRevFilter: correct changedPathFilter usage for multi-paths inclusionXing Huang2024-03-183-6/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The expected behavior of TreeRevFilter when filtering multiple file paths is to include commits that changed at least one of the given paths; only skipping them if they did not change any of the given paths. The current changedPathFilter utilization logic is skipping a commit if there exists at least one given path that the commit did not change, disregarding the rest of the given paths. Enforcing all given paths to be checked by the changedPathFilter, only skipping a commit if changedPathFilter return negative on all given paths. Signed-off-by: Xing Huang <xingkhuang@google.com> Change-Id: Ib7a9e496b37ec737722fbf33c5d0f05d5d910a8d
* | | | Merge "CleanupService: preload JgitText if not running in OSGi"Thomas Wolf2024-03-182-18/+49
|\ \ \ \ | |/ / / |/| | |
| * | | CleanupService: preload JgitText if not running in OSGiThomas Wolf2024-03-152-18/+49
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Load class JGitText eagerly when ShutdownHook is used. If not running in an OSGi framework, the hook executes as a JVM shutdown hook. Normally classloading in a shutdown hook should not be a problem, but there are some other frameworks besides OSGi that may close classloaders before such a JVM shutdown hook runs, for instance Plexus classworlds used in maven. This is not a full fix for classloading problems in JGit shutdown hooks. If a listener causes additional classes to be loaded, there may still be problems. But the current listeners registered with ShutdownHook all appear to use only classes that should already be loaded; except JGitText. Bug: jgit-36 Change-Id: Iab00134b4720adb19e1394c38ad79f1c43c3466b Signed-off-by: Thomas Wolf <twolf@apache.org>
* | | PathFilterGroup: implement getPathsBestEffort()Xing Huang2024-03-183-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getPathsBestEffort() is a method in the TreeFilter class to retrieve file paths specified by the caller. PathFilterGroup do not propagate the paths of their subfilters as it does not implement the getPathsBestEffort() method, resulting in the caller only getting an empty list of paths. Override getPathsBestEffort() in PathFilterGroup to propagate subfilter values. Signed-off-by: Xing Huang <xingkhuang@google.com> Change-Id: I76bf08795360abc0874a7c258636d4f37da35060
* | | DfsPackFile: get commitGraph.readChangePaths from repo configXing Huang2024-03-143-1/+74
| |/ |/| | | | | | | | | | | | | | | | | | | By default, CommitGraphLoader reads the readChangedPaths flag from SystemReader ignoring the values set at repo-level. Read the value of the property from the repo configuration and pass it to CommitGraphLoader. Signed-off-by: Xing Huang <xingkhuang@google.com> Change-Id: I34c807714c5a7573769ba9d611457aa107006244
* | Merge "CommitGraphLoader: receive readChangedPaths as parameter"Ivan Frade2024-03-121-11/+40
|\ \
| * | CommitGraphLoader: receive readChangedPaths as parameterXing Huang2024-03-121-11/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commitGraph.readChangedPaths controls the read of bloom filter chunks from commit graph. CommitGraphLoader uses SystemReader to read this conf, so it only sees its value when it is set in $XDG_CONFIG_HOME/jgit/config (and not, for example, in the repo config). Pass the readChangedPaths value to the method that reads the commit graph. Callers should read the value from the right configuration. This change is a noop, but allows to move callers to the new method progressively. Follow up changes will remove the previous method and its usages. Signed-off-by: Xing Huang <xingkhuang@google.com> Change-Id: If10c9b758fbe0498c7bd1e6ac1cda8869682f16d
* | | Merge "Add pull request template discouraging usage of pull requests"Matthias Sohn2024-03-111-0/+5
|\ \ \
| * | | Add pull request template discouraging usage of pull requestsMatthias Sohn2024-03-111-0/+5
| | |/ | |/| | | | | | | | | | | | | since we use Gerrit for code review. Change-Id: I2eeea82452d678564e17e3db9bd6ca7ef4ae4cc2
* / | Update CONTRIBUTING.md to point to GitHub issuesAntonin Delpeuch2024-03-101-1/+3
|/ / | | | | | | | | | | | | | | | | With a link to older bugs in Bugzilla. I have no idea if this is an accurate description of the situation, it's all guesswork on my part. Signed-off-by: Antonin Delpeuch <antonin@delpeuch.eu> Change-Id: I019689115a744daf588a86b44e998d2dfe03d4b5
* | Merge "ShutdownHook: run on bundle deactivation if in OSGi"Matthias Sohn2024-03-096-20/+118
|\ \
| * | ShutdownHook: run on bundle deactivation if in OSGiThomas Wolf2024-03-086-20/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running as a JVM shutdown hook is far too late in an OSGi framework; by the time the JVM shuts down, the OSGi framework will normally already have deactivated and unloaded bundles, and thus the JGit cleanup code may try to work with unloaded classes for which there will be no classloader anymore. When JGit is used in an OSGi framework, the cleanups must run on bundle deactivation, not on JVM shut down. Add a declarative OSGi service CleanupService. This is a normal Java class that has no dependencies on any OSGi bundle or interface, but that is declared in the MANIFEST.MF and in an OSGi Service XML as an OSGi immediate component. Set the bundle activation policy to "lazy". (A declarative service is used instead of a bundle activator because the latter would need to implement the OSGi interface BundleActivator, but JGit should not have dependencies on OSGi.) When JGit runs in an OSGi framework, the framework will create an instance of CleanupService through the no-args constructor when (and before) the first class from this bundle is loaded. This instance thus knows that it is operating in OSGi, and will run the ShutdownHook when the bundle is deactivated: bundle deactivation will deactivate the CleanupService instance. When JGit does not run in an OSGi framework, the OSGi service declaration will be ignored, and there will be no already existing CleanupService instance. We create one lazily, which thus knows that it is not operating in OSGi, and which will use a JVM shutdown hook to run the ShutdownHook. This also reverts commit e6d83d61eade6dee223757d149a4df9650752a55. Bug: jgit-36 Change-Id: I9c621b0707453c087f638974312ea1bf8ec30c31 Signed-off-by: Thomas Wolf <twolf@apache.org>
* | | FS_POSIX.runInShell(): on MacOS use a login shellThomas Wolf2024-03-091-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Mac, $PATH for UI programs is not the same as in a shell (terminal). It is typically much shorter. This may lead to surprises when hooks that work fine via the command-line git do not work when run via JGit in a UI application, such as EGit in Eclipse. Therefore use a login shell to run hooks and other commands spawned by git if we're on MacOS. This will give the hooks the same environment as in a terminal. Bug: egit-16 Change-Id: Id2e5485c6d3080d3ef8baa61ad7f6f198f77c590 Signed-off-by: Thomas Wolf <twolf@apache.org>
* | | [ssh] Implement the "Ciphers" SSH configThomas Wolf2024-03-093-4/+92
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream will remove the CBC algorithms aes128-cbc, aes192-cbc, and aes256-cbc from the server's KEX proposal in the next release. Removal of these algorithms by default in the client is planned for the release after that. These CBC algorithms were found vulnerable back in 2008,[1] and OpenSSH does not propose them: server-side since 2014, client-side since 2017. It is _highly_ unlikely that the removal of these algorithms by default would affect any JGit user. Nevertheless, let's give users a way to explicitly specify ciphers (including enabling deprecated algorithms) via their ~/.ssh/config file. [1] https://www.kb.cert.org/vuls/id/958563 Change-Id: I7444861df3a7f526277fef2485773a20ac74ae8a Signed-off-by: Thomas Wolf <twolf@apache.org>
* | [diffmergetool] Fix running command on CygwinThomas Wolf2024-03-071-3/+3
| | | | | | | | | | | | | | | | Because FS_Win32_Cygwin is a subclass of FS_Win32 the "instanceof" test for Cygwin must come first. Bug: jgit-34 Change-Id: If0cc0fa77e7aa0ce680289cecf808bc8859911a1 Signed-off-by: Thomas Wolf <twolf@apache.org>
* | [releng] Bump japicmp base version to 6.9.0.202403050737-rThomas Wolf2024-03-071-1/+1
| | | | | | | | Change-Id: I6008ef632e6cd88d337ac5b888b52a4b1d3ca85f Signed-off-by: Thomas Wolf <twolf@apache.org>
* | DfsBlockCache: move cache table specific implementations to a new classLaura Hamelin2024-03-053-551/+933
| | | | | | | | | | | | | | | | | | | | | | | | | | This move of the cache table specific implementation to its own class and extracting the method definition to an interface will allow for additional reworking of the dfs block cache with the goal of letting users implement their own context specific cache tables. This work does not intend to change how the dfs block cache is accessed, limiting the change to DfsBlockCache internal changes only. Change-Id: Ief6755d1dcf54b4f73f9fe8d22ccb9e2952cb0c4 Signed-off-by: Laura Hamelin <haowl@google.com>
* | Prepare 6.10.0-SNAPSHOT buildsMatthias Sohn2024-03-0589-534/+534
| | | | | | | | Change-Id: Ie728ef9a7d3c6430a5da30f6a61afd2176015748
* | Merge branch 'stable-6.9'Matthias Sohn2024-03-0589-534/+534
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.9: Prepare 6.9.1-SNAPSHOT builds JGit v6.9.0.202403050737-r JGit v6.9.0.202403050045-r Prepare 6.9.0-SNAPSHOT builds JGit v6.9.0.202402281855-rc1 Prepare 6.9.0-SNAPSHOT builds JGit v6.9.0.202402211805-m3 Change-Id: I08175c3bced7f94507a4def8fbf58c7d570e353c
| * | Prepare 6.9.1-SNAPSHOT buildsMatthias Sohn2024-03-0589-534/+534
| | | | | | | | | | | | Change-Id: I10f901209be2faa34ebb9355c86c2106bac38ba5
| * | JGit v6.9.0.202403050737-rv6.9.0.202403050737-rMatthias Sohn2024-03-0589-123/+123
| | | | | | | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I70494c0c69ac549dea9b4cf7c5b25e94c1b4b250
| * | JGit v6.9.0.202403050045-rv6.9.0.202403050045-rMatthias Sohn2024-03-0589-123/+123
| | | | | | | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I4c7a6542ad4252c5a9499e69f68650d2026bde40
| * | Merge branch 'master' into stable-6.9Matthias Sohn2024-03-054-0/+60
| |\ \ | |/ / |/| | | | | | | | | | | | | | * master: Introduce core.trustLooseRefStat config Change-Id: I373138c4334d94b3e1e4335ee555b68f907d4c89
* | | Introduce core.trustLooseRefStat configKaushik Lingarkar2024-03-054-0/+60
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With repositories on NFS, JGit can read an old value of a loose ref or miss the existence of a loose ref if file attributes of the loose ref or its parent directories are cached by NFS. Introduce a new config 'core.trustLooseRefStat' that will optionally refresh file attributes of the loose ref (at least on some NFS clients). Possible values for this new config are: * always: Trust loose ref file attributes (default) * after_open: Similar to 'always', but refresh the file attributes of the loose ref and its parent directories before trusting it The default is set to always trust the file attributes as after_open is known to degrade performance. In a subsequent change, SnapshottingRefDirectory will be updated to cache the directories that were refreshed to avoid duplicate work and thereby improve performance to some extent for the after_open setting. Change-Id: I9dfaeaf5307b2b51ce6ee4bfd9e0678786685fcf Signed-off-by: Kaushik Lingarkar <quic_kaushikl@quicinc.com>
| * Prepare 6.9.0-SNAPSHOT buildsMatthias Sohn2024-03-0589-123/+123
| | | | | | | | Change-Id: Ifadeead735c8772e58dd4e5c7381b44c5221a295
| * JGit v6.9.0.202402281855-rc1v6.9.0.202402281855-rc1Matthias Sohn2024-02-2889-123/+123
| | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I23d489ccdc257a8c25da4b90dc51d4a8951d320c
| * Merge branch 'master' into stable-6.9Matthias Sohn2024-02-2814-288/+384
| |\ | |/ |/| | | | | | | | | | | | | | | | | | | | | * master: Update SECURITY.md DfsObjDatabase: Let object database instantiate DfsPackFiles DfsPackFile: Abstract the bitmap loading to support other backends Remove unused API problem filters Support public key in IdentityFile Revert "StartGenerator: Fix parent rewrite with non-default RevFilter" DfsReader#getObjectSize: use size index if possible Change-Id: I60244aec1e44fe5b757a9b7ccb320697e0dc9b29
* | Merge "Update SECURITY.md"Matthias Sohn2024-02-281-30/+23
|\ \
| * | Update SECURITY.mdMatthias Sohn2024-02-281-30/+23
| | | | | | | | | | | | | | | | | | | | | | | | Use the text of the general Eclipse Vulnerability Reporting page at https://www.eclipse.org/security. Bug: jgit-31 Change-Id: I07dcf83199956e0173f958356661ade33252dab4