summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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>
| * | [errorprone] Fix wrong comparison which always evaluated to falseMatthias Sohn2024-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/GraphObjectIndex.java:59: error: [ComparisonOutOfRange] ints may have a value in the range -2147483648 to 2147483647; therefore, this comparison to Integer.MAX_VALUE will always evaluate to false if (table[k] > Integer.MAX_VALUE) { ^ See https://errorprone.info/bugpattern/ComparisonOutOfRange We need to check if variable `uint` of type `long` exceeds the maximum possible int value before casting it to `int` below. This was introduced in Ib5c0d6678cb242870a0f5841bd413ad3885e95f6 Change-Id: I675d594f523084be4c1678328cc343065e32d998 (cherry picked from commit 916200e278ebeaa2602b5dc23143c8eedf11858b)
| * | [errorprone] Remove unnecessary comparisonMatthias Sohn2024-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Raised by errorprone: org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitConfig.java:406: error: [ComparisonOutOfRange] chars may have a value in the range 0 to 65535; therefore, this comparison to 0 will always evaluate to true if (ch >= 0 && ch < inUse.length) { ^ see https://errorprone.info/bugpattern/ComparisonOutOfRange Change-Id: I9625aa7894a34dbffd77d39a40c6e285c86b56d5 (cherry picked from commit cf5ec856bda907c0537ce5a80246b9ab18195c8b)
* | | Merge branch 'stable-6.7' into stable-6.8Dariusz Luksza2024-02-123-5/+169
|\| | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.7: Improve handling of NFS stale handle errors Fix handling of missing pack index file Add tests for handling pack files removal during fetch Change-Id: I409d1dc3354ad65c048d2c40f39071a1207246c6
| * | Merge branch 'stable-6.6' into stable-6.7Dariusz Luksza2024-02-123-5/+169
| |\| | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.6: Improve handling of NFS stale handle errors Fix handling of missing pack index file Add tests for handling pack files removal during fetch Change-Id: Ie00984319d68beeffcbdb6bb323fbeb94a118e5c
| | * Improve handling of NFS stale handle errorsDariusz Luksza2024-01-291-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark packfile as invalid when NFS stale handle error occurs. This should fix broken fetch operations when the repo is located on the NFS system and is GC'ed on a separate system (or process). Which may result in the index, pack or bitmap file being removed when they are accessed from the fetch operation. Bug: 573770 Signed-off-by: Dariusz Luksza <dariusz.luksza@gmail.com> Change-Id: I70217bfb93bf7421ea2c1d74cbe4f15c76d9c098 (cherry picked from commit c701c01b49d92993f1c3df0a0e26a2dd68b8cec1)
| | * Fix handling of missing pack index fileDariusz Luksza2024-01-293-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As demonstrated in `UploadPackHandleDeletedPackFile.testV2IdxFileRemovedDuringUploadPack` the fetch operation will fail when the pack index file is removed. This is due to a wrapping of `FileNotFoundException` (which is a subclass of `IOExeption`) in an `IOException` at PackIndex L#68. This is then changing the behaviour of error handling in `Pack.file.getBitmapIndex()` where the `FileNotFoundException` is swallowed and allows the fetch process to continue. With FNFE being wrapped in IOE, this blows up and breaks the fetch operation. Simply rethrowing `FileNotFoundException` from `PackFile.open()` fixes the broken fetch operation. This will also mark the whole pack as invalid in the `IOException` handler in `Pack.idx()` method. Change-Id: Ibe321aa1af21d26500e1cb2eb3464cc99a6dbc62 Signed-off-by: Dariusz Luksza <dariusz.luksza@gmail.com> (cherry picked from commit e0910eda3ea1c474b4cf9b00ac698f739a982f8c)
| | * Add tests for handling pack files removal during fetchDariusz Luksza2024-01-291-0/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although this could sound like a corner case, it really can occur out there in the real world. Especially in the Gerrit world where the repositories could be GC'ed on a separate process or system. The `FileNotFoundException` seems to be handled correctly in `PackFile#doOpen` (line 671) and it will mark the pack as invalid. But triggering that code path was not an easy task. First of all, we need to add a new commit to the `master` branch of the test repository after `UploadPack` object is created. Secondly, in the refspec for fetch, commit id instead of "regular" refspec must be used. With both in place, we can see a warning log statement about deleted pack file. And the fetch succeeds! Also, tests for the removal of *.idx and *.bitmap files were added. This unveiled a corner for the *.idx file deletion while fetching, as the test will fail with "Unreachable pack index" IOException only when the HEAD commit is empty. Change-Id: If26c83f9b12993d1ab7d6bad6bd863c29520b062 Signed-off-by: Dariusz Luksza <dariusz.luksza@gmail.com> (cherry picked from commit ba5adc4ce6f234cb300b0f73a1efdba9bba1b5d8)
* | | Merge branch 'stable-6.7' into stable-6.8Matthias Sohn2024-01-2011-41/+449
|\| | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.7: Introduce a PriorityQueue sorting RevCommits by commit timestamp Remove org.eclipse.jgit.benchmark/.factorypath Update jmh to 1.37 for org.eclipse.jgit.benchmark Change-Id: I5d49a9dc7da17b83243229d4d8d3b9ee0a063e65
| * | Merge branch 'stable-6.6' into stable-6.7Matthias Sohn2024-01-2013-87/+463
| |\| | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.6: Introduce a PriorityQueue sorting RevCommits by commit timestamp Remove org.eclipse.jgit.benchmark/.factorypath Update jmh to 1.37 for org.eclipse.jgit.benchmark Change-Id: I76ebca527e523f124bfe81c821169c790eddccb6
| | * Introduce a PriorityQueue sorting RevCommits by commit timestampLuca Milanesio2024-01-1910-17/+449
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DateRevQueue uses a tailor-made algorithm to keep RevCommits sorted by reversed commit timestamp, which has a O(n*n/2) complexity and caused the explosion of the Git fetch times to tens of seconds. The standard Java PriorityQueue provides a O(n*log(n)) complexity and scales much better with the increase of the number of RevCommits. Introduce a new implementation DateRevPriorityQueue of the DateRevQueue based on PriorityQueue. Enable usage of the new DateRevPriorityQueue implementation by setting the system property REVWALK_USE_PRIORITY_QUEUE=true. By default the old implementation DateRevQueue is used. Benchmark results: ``` (numCommits) (usePriorityQueue) Mode Cnt Score Error Units 5 true avgt 10 39,4 ± 6,1 ns/op 5 false avgt 10 14,1 ± 2,2 ns/op 10 true avgt 10 29,7 ± 3,5 ns/op 10 false avgt 10 13,2 ± 2,0 ns/op 50 true avgt 10 50,4 ± 5,3 ns/op 50 false avgt 10 18,6 ± 0,2 ns/op 100 true avgt 10 58,3 ± 5,0 ns/op 100 false avgt 10 20,5 ± 0,8 ns/op 500 true avgt 10 51,7 ± 2,6 ns/op 500 false avgt 10 43,3 ± 0,5 ns/op 1000 true avgt 10 49,2 ± 2,4 ns/op 1000 false avgt 10 62,7 ± 0,2 ns/op 5000 true avgt 10 48,8 ± 1,5 ns/op 5000 false avgt 10 228,3 ± 0,5 ns/op 10000 true avgt 10 44,2 ± 0,9 ns/op 10000 false avgt 10 377,6 ± 2,7 ns/op 50000 true avgt 10 50,3 ± 1,6 ns/op 50000 false avgt 10 637,0 ± 111,8 ns/op 100000 true avgt 10 61,8 ± 4,4 ns/op 100000 false avgt 10 965,1 ± 268,0 ns/op 500000 true avgt 10 127,2 ± 7,9 ns/op 500000 false avgt 10 9610,2 ± 184,8 ns/op ``` Memory allocation results: ``` Number of commits loaded: 850 000 Custom implementation: 378 245 120 Bytes Priority queue implementation: 340 495 616 Bytes ``` Bug: 580137 Change-Id: I8b33df6e9ee88933098ecc81ce32bdb189715041 Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
| | * Remove org.eclipse.jgit.benchmark/.factorypathMatthias Sohn2024-01-191-29/+0
| | | | | | | | | | | | | | | | | | it's outdated and seems to be unused. Change-Id: I4ac0f6d6427ee9f76a59296e991e4e03b25bcf05
| | * Update jmh to 1.37 for org.eclipse.jgit.benchmarkMatthias Sohn2024-01-193-17/+6
| | | | | | | | | | | | | | | | | | | | | and - fix org.eclipse.jgit.benchmark/.classpath Change-Id: I66f81228f17ede5732fa43aa693b4cfddb5a71f6
* | | Merge branch 'stable-6.7' into stable-6.8Matthias Sohn2024-01-101-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.7: Silence API warnings Make sure ref to prune is in packed refs Checkout: better directory handling Change-Id: Ie8c433e14d025055aa6ce674d6d1220fe1354785
| * | Merge branch 'stable-6.6' into stable-6.7Matthias Sohn2024-01-102-1/+102
| |\| | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.6: Silence API warnings Make sure ref to prune is in packed refs Checkout: better directory handling Change-Id: Id3b01c7a583d45b4e67e3f993006a5646f77a41d
| | * Merge branch 'stable-6.5' into stable-6.6Matthias Sohn2024-01-100-0/+0
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.5: Checkout: better directory handling Change-Id: I1712191514b8c1b9ea048974376a6765ff7970c7
| | | * Merge branch 'stable-6.4' into stable-6.5Matthias Sohn2024-01-100-0/+0
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.4: Checkout: better directory handling Change-Id: I68e11fb06a354961f4146de51d326b69be5b69d3
| | | | * Merge branch 'stable-6.3' into stable-6.4Matthias Sohn2024-01-100-0/+0
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.3: Checkout: better directory handling Change-Id: Ie0fefa8afc07f638ee05a46d272db7b7b0f8d464
| | | | | * Merge branch 'stable-6.2' into stable-6.3Matthias Sohn2024-01-100-0/+0
| | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.2: Checkout: better directory handling Change-Id: Id27612578f822cabc1a38ad1f8e859ae354045a9
| | | | | | * Merge branch 'stable-6.1' into stable-6.2Matthias Sohn2024-01-100-0/+0
| | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.1: Checkout: better directory handling Change-Id: I2f8e5410f4962d38bc6e822b5cda42df68aef32b
| | | | | | | * Merge branch 'stable-6.0' into stable-6.1Matthias Sohn2024-01-100-0/+0
| | | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.0: Checkout: better directory handling Change-Id: Ide9fb318b5fe413d73d73a19943c6dacdcf07f3d
| | | | | | | | * Merge branch 'stable-5.13' into stable-6.0Matthias Sohn2024-01-100-0/+0
| | | | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.13: Checkout: better directory handling Revert commit 170244d05977491271a1cc234583d2e5ba75145d "Checkout: better directory handling" which is the downport of the original fix Ie12864c54c9f901a2ccee7caddec73027f353111 which was done on stable-6.6. Merging this up to stable-6.6 would be a lot of work and these branches aren't maintained anymore hence revert this change here. This way the fix is available on stable-5.13 for those who still need Java 8 and everybody else should upgrade to 6.6.1 or higher. Change-Id: Iffe50a5e62c6655814265d9cc6c5c2996baa1a31
| | | | | | | | | * Checkout: better directory handlingThomas Wolf2023-10-2218-142/+1061
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This backports the upstream security fix to downstream stable-5.13 branch. (cherry picked from commit 9072103f3b3cf64dd12ad2949836ab98f62dabf1) When checking out a file into the working tree ensure that all parent directories of the file below the working tree root are actually directories and do exist before we try to create the file. When multiple files are to be checked out (or even a whole tree), this may check the same directories over and over again. Asking the file system every time for file attributes is a potentially expensive operation. As a remedy, introduce an in-memory cache of directory states for a particular check-out operation. Apply the same fix also in the ResolveMerger, which may also check out files, and also in the PatchApplier. In PatchApplier, also validate paths. Change-Id: Ie12864c54c9f901a2ccee7caddec73027f353111 Signed-off-by: Thomas Wolf <twolf@apache.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | | | | | Silence API warningsMatthias Sohn2024-01-081-0/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I44084c45ed2c5e642021d1de4f37af769e4b317f
| | * | | | | | | | Make sure ref to prune is in packed refsFabio Ponciroli2023-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RefDirectory:pack might raise an NPE when deleting loose refs as final part of the RefDirectory.pack(). This is what the code does: 1) packed ref update: update the list of refs which will be persisted in packed-refs 2) persit packed-refs: flush on file the refs computed in #1 3) prune loose refs: prune loose refs that have been packed in #2 The code correctly locks the packed-refs file during phases 1 to 3. However, it makes the wrong assumption of considering the loose refs set as immutable between phases 1 and 3. The number and values of loose refs on the filesystem can mutate at any time whilst the RefDirectory.pack() is in progress. Assuming the contrary can lead to an NPE when retrieving refs from the mutable loose refs list during phase #3. Make sure that the ref is not null before dereferencing its object-id value. Bug: jgit-4 Change-Id: I2cd01f8a880f3c6561ad978a389ec2db45b6018b
* | | | | | | | | | Prepare 6.8.1-SNAPSHOT buildsMatthias Sohn2023-11-2991-536/+536
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I56458c5345dcd9544868c948e90c9827d25c6850
* | | | | | | | | | JGit v6.8.0.202311291450-rv6.8.0.202311291450-rMatthias Sohn2023-11-2991-125/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: Iecfe3f628cfdc437ee0d63fe52653ef952c8c494
* | | | | | | | | | Rename method parameter to fix warning about hidden fieldMatthias Sohn2023-11-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id094ab022f82db0f3eb220052adc0aed1cde2d50
* | | | | | | | | | Fix warnings about empty control flow statementsMatthias Sohn2023-11-291-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If1595ac148edf88a18efdd90c4f40d0ac719caab
* | | | | | | | | | BitmapIndexImpl: externalize error messageMatthias Sohn2023-11-293-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5189e966aecc57fe7c3e6c3f7f8e6b16917ee27f
* | | | | | | | | | Suppress not-externalized string warningsMatthias Sohn2023-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2a0a588227d451cb175e17eef20ecb6fe9e9ef80
* | | | | | | | | | Silence API error for new method BitmapIndex#addBitmapLookupListenerMatthias Sohn2023-11-291-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it has an empty default implementation. Change-Id: I56b16c48992652a4ddaaf4c0435e08452c65749e
* | | | | | | | | | Update Orbit to orbit-aggregation/2023-12Matthias Sohn2023-11-2815-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ifde28f60461e0a9d7b1278f8f178ceb2c4e1db7a
* | | | | | | | | | Merge branch 'master' into stable-6.8Matthias Sohn2023-11-2713-143/+272
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: Adapt to type parameter added in commons-compress 1.25.0 Improve footer parsing to allow multiline footers. Make the tests buildable by bazel test BitmapIndex: Add interface to track bitmaps found (or not) BitmapWalker: Remove BitmapWalkListener Change-Id: Id2aeb0acd37bdd68a2f2c9f09f4d442fa40c9dd1
| * \ \ \ \ \ \ \ \ \ Merge "Improve footer parsing to allow multiline footers."Matthias Sohn2023-11-263-28/+81
| |\ \ \ \ \ \ \ \ \ \
| | * | | | | | | | | | Improve footer parsing to allow multiline footers.Kamil Musin2023-11-243-28/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the https://git-scm.com/docs/git-interpret-trailers the CGit supports multiline trailers. Subsequent lines of such multiline trailers have to start with a whitespace. We also rewrite the original parsing code to make it easier to work with. The old code had pointers moving both backwards and forwards at the same time. In the rewritten code we first find the start of the last paragraph and then do all the parsing. Since all the getters of the FooterLine return String, I've considered rewriting the parsing code to operate on strings. However the original code seems to be written with the idea, that the data is only lazily copied in getters and no extra allocations should be performed during original parsing (ex. during RevWalk). The changed code keeps to this idea. Bug: Google b/312440626 Change-Id: Ie1e3b17a4a5ab767b771c95f00c283ea6c300220
| * | | | | | | | | | | Merge "Make the tests buildable by bazel test"Matthias Sohn2023-11-251-17/+17
| |\| | | | | | | | | |
| | * | | | | | | | | | Make the tests buildable by bazel testKamil Musin2023-11-231-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All the errorprone checkers fail in many existing places of the codebase, making it impossible to run bazel test. Downgrade all to ":WARN". MergeToolTest is asserting a wrong error line, but the line seems different between bazel and mvn test runs. Therefore we don't fix it and simply run ``` bazel test -- //... -//org.eclipse.jgit.pgm.test:pgm ``` Change-Id: I44913ebc70dcc934cb69481cc3ff9ae0d8059707
| * | | | | | | | | | | Adapt to type parameter added in commons-compress 1.25.0Matthias Sohn2023-11-245-15/+20
| |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 1.25.0 commons-compress added a generic type parameter to ArchiveOutputStream to avoid unchecked/unconfirmed type casts in subclasses. Change-Id: Ib4c208fc1fb65f73ea57c5bf723fde71b0d6d9f7
| * | | | | | | | | | BitmapIndex: Add interface to track bitmaps found (or not)Ivan Frade2023-11-213-1/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to know what objects had bitmaps in the walk of the request. We can check their position in the history and evaluate our bitmap selection algorithm. Introduce a listener interface to the BitmapIndex to report which getBitmap() calls returned a bitmap (or not) and a method to the bitmap index to set the listener. Change-Id: Iac8fcc1539ddd2dd450e8a1cf5a5b1089679c378
| * | | | | | | | | | BitmapWalker: Remove BitmapWalkListenerIvan Frade2023-11-211-82/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can track bitmaps queries that found a bitmap directly in the BitmapIndex. Remove the listener. Change-Id: I5ad518a58b681bf327fee3ae5c5f6e4449d3da1f
* | | | | | | | | | | Prepare 6.8.0-SNAPSHOT buildsMatthias Sohn2023-11-2291-125/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I89178175549541111cddb88da401899960c0ecac
* | | | | | | | | | | JGit v6.8.0.202311212206-rc1v6.8.0.202311212206-rc1Matthias Sohn2023-11-2191-125/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I6a40cdef68538fa769f4525eb2ff1ed4a810f11c
* | | | | | | | | | | Merge branch 'master' into stable-6.8Matthias Sohn2023-11-2138-396/+2000507
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: Update repository URLs in CONTRIBUTING.md Fix typo in FileUtils.isStaleFileHandle() javadoc Fix branch ref exist check gpg.bc: Supress errorprone InsecureCryptoUsage Adjust javadoc to pass errorprone checks Update org.apache.commons:commons-compress to 1.25.0 Fix annotation of deprecated constant CONFIG_KEY_STREAM_FILE_TRESHOLD BitmapWalkListener: Use plain interface with noop instance BitmapWalkListener: Add method and rename for commits Update bouncycastle to 1.77 PatchApplier: wrap output's TemporaryBuffer with a CountingOutputStream BitmapWalker: announce walked objects via listener interface Update jetty to 10.0.18 SSH: bump org.apache.sshd to 2.11.0 CommitGraphWriter: Remove unnecesary progress update call Change-Id: I97574c4801ccafd4e808a1fcf6f8d079ff5709b3