summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * | DfsObjDatabase: Let object database instantiate DfsPackFilesIvan Frade2024-02-263-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DfsPackfile used to have only one constructor and it is invoked from 3 locations. Now we can construct DfsPackFiles with different bitmap loaders, so it is helpful to concentrate the instantiation in one location. Create DfsPackFile instances in the object database. This let subclasses choose how to initialize those instances. Change-Id: Ibb2ad86865154b6e7f0d5d26e8f533e0b5586246
| * | DfsPackFile: Abstract the bitmap loading to support other backendsIvan Frade2024-02-262-26/+168
| |/ | | | | | | | | | | | | | | | | | | | | | | Current code reads the bitmap index from the pack extension and loads all bitmaps into memory, with its IO and memory cost. We could consider to store the bitmaps on e.g. a database and load them on demand. Abstract the loading of the PackBitmapIndex in an interface that can be implemented with other backends. Change-Id: Ib5f64d05954708ea5325feea7088a8df229b36a5
| * Remove unused API problem filtersMatthias Sohn2024-02-251-30/+0
| | | | | | | | Change-Id: I0d81fda5edde5348e765eebc39bd9293fba51e91
| * Merge "Support public key in IdentityFile"Thomas Wolf2024-02-231-14/+45
| |\
| | * Support public key in IdentityFileKonrad Windszus2024-02-221-14/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Public keys in the SSH configuration's "IdentityFile" are used for example by Password Managers like KeePassXC (https://keepassxc.org/docs/#faq-ssh-agent-auth-errors) or 1Password (https://developer.1password.com/docs/ssh/agent/advanced/#match-key-with-host) to match keys in the SSH agent with specific hosts. Bug: jgit-25 Change-Id: I33d47057d9dd54d3d08ba5bb17f730435ac93dac
| * | Merge "DfsReader#getObjectSize: use size index if possible"Ivan Frade2024-02-232-62/+104
| |\ \
| | * | DfsReader#getObjectSize: use size index if possibleIvan Frade2024-02-202-62/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getObjectSize reads the size from the first bytes of the object in the pack, using IO. For blobs and depending on the configuration, the size could be available in the object size index. Try to get the size from the object size index if available. Read from the pack otherwise. Note that GC uses #getObjectSize from the existing pack to write the next object size index. Change-Id: Ia999290c06d061cb53aa8c0a2b28b1a9761567ef
| * | | Merge "Revert "StartGenerator: Fix parent rewrite with non-default RevFilter""Ivan Frade2024-02-224-123/+24
| |\ \ \
| | * | | Revert "StartGenerator: Fix parent rewrite with non-default RevFilter"Ivan Frade2024-02-214-123/+24
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit db5ce6b5c24408ae27eb6fa0b6289d51b129baeb. Reason to revert: This change utilizes the RewriteGenerator even in absence of a path, making the walk lengthy. Change-Id: I5ffa6e8fead328191348c1e46828bf8c75ae1e42
* | | | Prepare 6.9.0-SNAPSHOT buildsMatthias Sohn2024-02-2289-123/+123
| | | | | | | | | | | | | | | | Change-Id: I11f4871bfdf6c6c0de5d5ed577edf16bac8cf681
* | | | JGit v6.9.0.202402211805-m3v6.9.0.202402211805-m3Matthias Sohn2024-02-2189-123/+123
|/ / / | | | | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: Id2f3934947d6d1e94feeb9e73ad7282ae089b682
* | | Merge branch 'stable-6.8'Matthias Sohn2024-02-215-10/+36
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.8: Delete org.eclipse.jgit.ssh.apache.agent/bin/.project Allow to discover bitmap on disk created after the packfile Change-Id: I08095dfaefb963876d993383cb35acc6b75d7691
| * \ \ Merge branch 'stable-6.7' into stable-6.8Matthias Sohn2024-02-215-10/+36
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.7: Delete org.eclipse.jgit.ssh.apache.agent/bin/.project Allow to discover bitmap on disk created after the packfile Change-Id: I01749bae6f46d1a8ebd25b890e667cc092f3a659
| | * \ \ Merge branch 'stable-6.6' into stable-6.7Matthias Sohn2024-02-216-38/+36
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.6: Delete org.eclipse.jgit.ssh.apache.agent/bin/.project Allow to discover bitmap on disk created after the packfile Change-Id: I2bbc8c9a4ed45d37fa7ba63b2afd5511b6cf47a2
| | | * | | Delete org.eclipse.jgit.ssh.apache.agent/bin/.projectMatthias Sohn2024-02-211-28/+0
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If2f50f81ffb8b5a1929b0ce403bff017ece29e2f
| | | * | | Allow to discover bitmap on disk created after the packfileLuca Milanesio2024-02-205-10/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the bitmap file was created *after* a packfile had been loaded into the memory, JGit was unable to discover them. That happed because of two problems: 1. The PackDirectory.getPacks() does not implement the usual while loop that is scanning through the packs directory as in the other parts of JGit. 2. The scan packs does not look for newly created bitmap files if the packfile is already loaded in memory. Implement the normal packfiles scanning whenever the PackDirectory needs to return a list of packs, and make sure that any reused Pack object would have its associated bitmap properly refreshed from disk. Adapt the assertions in GcConcurrentTest with the rescanned list of Pack from the objects/packs directory. Bug: jgit-15 Change-Id: I2ed576cefd78a0e128b175228a59c9af51523d7b
* | | | | | Update jetty to 10.0.20Matthias Sohn2024-02-2018-143/+143
| |_|_|/ / |/| | | | | | | | | | | | | | Change-Id: Ic79c5ce718fe1345f75c4254a9ee2aa7d91af359
* | | | | Update maven pluginsMatthias Sohn2024-02-203-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - build-helper-maven-plugin to 3.5.0 - cyclonedx-maven-plugin to 2.7.11 - eclipse-jarsigner-plugin to 1.4.3 - git-commit-id-maven-plugin to 7.0.0 - japicmp-maven-plugin to 0.18.5 - maven-clean-plugin to 3.3.2 - maven-compiler-plugin to 3.12.1 - maven-enforcer-plugin to 3.4.1 - maven-jxr-plugin to 3.3.2< - maven-site-plugin to 4.0.0-M13 - spotbugs-maven-plugin to 4.8.3.1 - tycho plugins to 4.0.6 Change-Id: Ie792f783b8b8453a37743f10f8c4162932e5ff85
* | | | | Update org.assertj:assertj-core to 3.25.3Matthias Sohn2024-02-2018-34/+34
| | | | | | | | | | | | | | | | | | | | Change-Id: I3fd8adf3c1cc3f2c8826602b11d1d11fdfe29bfb
* | | | | Update org.mockito:mockito-core to 5.10.0Matthias Sohn2024-02-2018-34/+34
| | | | | | | | | | | | | | | | | | | | Change-Id: I35dbb2402e65753e10bef4617b7e1683f9900406
* | | | | Update org.apache.commons:commons-compress to 1.26.0Matthias Sohn2024-02-2022-34/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new version now requires commons-io for the tests. Hence adding dependency to commons-io:commons-io:2.15.1. Change-Id: Ieb50ef559a119c89f90d700ab95a73c0fcae85a8
* | | | | Update byte-buddy to 1.14.12Matthias Sohn2024-02-2018-51/+51
| | | | | | | | | | | | | | | | | | | | Change-Id: Idc56efd1ee6d9d1e039ccfffd5e16803b727f6dc
* | | | | Add SystemReader.Delegate to reduce boiler-plate code needed to subclassMatthias Sohn2024-02-201-0/+61
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original implementation by Han-Wen Nienhuys in Gerrit [1]. [1] https://gerrit-review.googlesource.com/c/gerrit/+/235169 Bug: jgit-24 Change-Id: I745f8c1c07de013a68168b91c2d9962d530d07bf
* | | | storage.file: Do not throw NSFE when deleting tmp filesNasser Grainawi2024-02-194-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we try to delete a tmp file and it already doesn't exist, then there's no problem and we don't need to throw an exception. This is especially true for these existing cases using FileUtils.RETRY because any missing files on retries are already considered successes. Not throwing the exception quiets some logs and improves overall exception handling. Change-Id: Ia6e06ba042c5920d5cd9f8db2e1d829affa3d796 Signed-off-by: Nasser Grainawi <quic_nasserg@quicinc.com>
* | | | FS.detectSymlinkSupport: fix a raceMotiejus Jakštys2024-02-192-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When multiple JGit clients are instantiated concurrently, they may try to create the same symlink at the same time. When that happens, the second thread will return an error (because the symlink already exists) and that `FS` instance will think that symlinks are not supported, causing havoc. Change-Id: I362b933ff63a1471e3a5d70cc8c35eb2f25cc0dd Signed-off-by: Motiejus Jakštys <motiejus@jakstys.lt>
* | | | Merge changes I8e577a23,Ic8e8b288Matthias Sohn2024-02-193-3/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * changes: Errorprone EscapedEntity: Do not use HTML entities inside @code javadoc ChangedPathFilter: Suppress warning about backing array (errorprone)
| * | | | Errorprone EscapedEntity: Do not use HTML entities inside @code javadocIvan Frade2024-02-092-3/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: I8e577a23e7fbe22a3024ad62144e7f19eec465c3
| * | | | ChangedPathFilter: Suppress warning about backing array (errorprone)Ivan Frade2024-02-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Errorprone warns about direct access to the underlying array. That is the intention of this code, and those ByteBuffers are created with ByteBuffer#wrap() so it should be safe. Change-Id: Ic8e8b288f08ac794cf7f09dfccfefcba0a4685bf
* | | | | Merge changes I9225d6a3,I9cf093ca,Id5a80635Matthias Sohn2024-02-197-63/+204
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: RawParseUtils.nextLfSkippingSplitLines: fulfil contract as stated [gpg] Refactor the GpgSignatureVerifier RawParseUtils: utility method to get a header value
| * | | | | RawParseUtils.nextLfSkippingSplitLines: fulfil contract as statedThomas Wolf2024-02-012-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there is no newline after the last header, the method is supposed to return the buffer length, but it returned buffer.length - 1. Change-Id: I9225d6a35a002244c246bc8781ceaf4369fb9a60
| * | | | | [gpg] Refactor the GpgSignatureVerifierThomas Wolf2024-02-014-54/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new method verify(GpgConfig, byte[], byte[]) and deprecate the existing verify(byte[], byte[]). Some implementations of the interface may need the GpgConfig. Factor out extracting the raw armored signature from commits or tags into an abstract AbstractGpgSignatureVerifier class so that different implementations don't have to re-implement that bit. Call the new verify method, passing along the GpgConfig. This makes the GPG interfaces more versatile and facilitates implementing an alternate GpgSignatureVerifier. Change-Id: I9cf093caa9fdebede801d665f2591cd9b275e1fd
| * | | | | RawParseUtils: utility method to get a header valueThomas Wolf2024-02-013-8/+74
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new method takes care of removing the leading blanks on continuation lines in multi-line headers. Change-Id: Id5a8063512a2abc3177c104d6ba8fa50d0dc6352
* | | | | Merge branch 'stable-6.8' into masterDariusz Luksza2024-02-153-26/+80
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.8: RefDirectory: Do not unlock until after deleting loose ref Add missing javadoc description for declared exception SnapshottingRefDirectory: Invalidate snapshot after locking ref for update SnapshottingRefDir: Replace lambas with method refs SnapshottingRefDir: Reduce casts with overrides [errorprone] Fix wrong comparison which always evaluated to false [errorprone] Remove unnecessary comparison Change-Id: I1d65c41292779dd5f8f46bc0adefbfc9a62ba2ce
| * | | | Merge branch 'stable-6.7' into stable-6.8Dariusz Luksza2024-02-153-26/+80
| |\ \ \ \ | | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.7: RefDirectory: Do not unlock until after deleting loose ref Add missing javadoc description for declared exception SnapshottingRefDirectory: Invalidate snapshot after locking ref for update SnapshottingRefDir: Replace lambas with method refs SnapshottingRefDir: Reduce casts with overrides [errorprone] Fix wrong comparison which always evaluated to false [errorprone] Remove unnecessary comparison Change-Id: Ic6312bd3b2b1db38a287ebc7f31062251341438a
| | * | | Merge branch 'stable-6.6' into stable-6.7Dariusz Luksza2024-02-153-26/+80
| | |\ \ \ | | | | |/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.6: RefDirectory: Do not unlock until after deleting loose ref Add missing javadoc description for declared exception SnapshottingRefDirectory: Invalidate snapshot after locking ref for update SnapshottingRefDir: Replace lambas with method refs SnapshottingRefDir: Reduce casts with overrides Change-Id: Ic5f3c46e5557d0bd143694bd6020b67b6ec8f22e
| | | * | RefDirectory: Do not unlock until after deleting loose refNasser Grainawi2024-02-131-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a potential race condition where we would remove our loose ref lock file before deleting the loose ref itself. This race could result in the current thread deleting a loose ref newly written by another thread. Other callers seem to be following the correct pattern, but improve the method naming to try to help future callers. Change-Id: I80cebe4788edd855e15381336d980c41498fca80 Signed-off-by: Nasser Grainawi <quic_nasserg@quicinc.com>
| | | * | Add missing javadoc description for declared exceptionMatthias Sohn2024-02-131-0/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I16305bc15d2ddff1ce055772a711658ef81858e2
| | | * | SnapshottingRefDirectory: Invalidate snapshot after locking ref forNasser Grainawi2024-02-132-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | update When using the SnapshottingRefDirectory, if a thread has already read packed-refs, then another actor updates packed-refs, the original thread may create an update that is based on the old cached/snapshotted packed-refs content. That update could effectively perform a forced update unintentionally because it is unaware of the new content. This seems particularly likely to happen in a scenario where a loose ref was just packed. If the ref was loose, our thread would see the current ref value (because we don't snapshot loose refs and always read them from disk), but since there is no loose ref, we expect to find the current value in packed-refs. However, (before this change) we rely on our snapshot of packed-refs which does not contain the updated ref value. Invalidating the cache after the loose ref is locked ensures that the ref value does not change again before we read it to perform the update. Bug: jgit-21 Change-Id: Id10900a99bfd0401a1b9c39d997093af0289649e Signed-off-by: Nasser Grainawi <quic_nasserg@quicinc.com>
| | | * | SnapshottingRefDir: Replace lambas with method refsNasser Grainawi2024-02-131-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Method references are shorter and easier to read in this case. Change-Id: Ia6809fa0e3f282acbe7b7f7e3813a34f3cf40c43 Signed-off-by: Nasser Grainawi <quic_nasserg@quicinc.com>
| | | * | SnapshottingRefDir: Reduce casts with overridesNasser Grainawi2024-02-131-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Overriding getRefDirectory() and getRefDatabase() lets us skip casting to SnapshottingRefDirectory in several places. Change-Id: I61ba12fb6f066b1a9c4ea5ec9538978cbf040acd Signed-off-by: Nasser Grainawi <quic_nasserg@quicinc.com>