summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update mockito to 5.8.0Matthias Sohn2023-12-2218-34/+34
| | | | Change-Id: I70d33b7af25fcb4754fb048dd9054eef7356f00c
* Add 4.31 target platform and update orbit to 4.31Matthias Sohn2023-12-2220-48/+355
| | | | | | and update bytebuddy to 1.14.10. Change-Id: I145776a31d806f7e6dcc90263650109b3eb19067
* Update ecj to 3.36.0Matthias Sohn2023-12-221-1/+1
| | | | Change-Id: I803de19e8086239ebbae9877121946fdddfbaa89
* Renormalize line endings based on .gitattributesMatthias Sohn2023-12-229-25/+25
| | | | | | This fixes line endings of all text files to use LF in the repository. Change-Id: I4df6fd7aaf9db9cdaa953a0d1062981b4612056c
* Configure .gitattributes to manage line endingsMatthias Sohn2023-12-221-1/+13
| | | | | | | | Mark test resources as binary to prevent line ending normalization Some of the test resources are used to test handling of line endings in JGit. Change-Id: Idd9ba604945797d1cd1f3af1a1987aee3188e1d6
* Normalize line endings to LF for all text filesMatthias Sohn2023-12-221-0/+1
| | | | Change-Id: I69753494e4c7db4c0a8e6eca3b3e63d3ff561117
* Merge "Remove invalid spotbugs configuration"Matthias Sohn2023-12-221-1/+0
|\
| * Remove invalid spotbugs configurationMichael Keppler2023-12-171-1/+0
| | | | | | | | | | | | | | | | | | | | * findbugsXmlOutput was renamed to spotbugsXmlOutput long ago * spotbugsXmlOutput has a default value of true and is deprecated, therefore removing the entire line seems most reasonable See https://spotbugs.github.io/spotbugs-maven-plugin/check-mojo.html#spotbugsXmlOutput Change-Id: I83c0bbce1fb3622accb13978319b4313b0121655
* | Merge "Fix PMD plugin configuration"Matthias Sohn2023-12-221-1/+1
|\ \
| * | Fix PMD plugin configurationMichael Keppler2023-12-171-1/+1
| |/ | | | | | | | | | | | | The configuration element has been renamed in release 3.18, see https://github.com/apache/maven-pmd-plugin/releases/tag/maven-pmd-plugin-3.18.0 Change-Id: Ia6ec6992c4348d77d4b61f34190a57775cc30cec
* | BasePackFetchConnection: Skip object/ref lookups if local repo is emptyDariusz Luksza2023-12-201-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When cloning repository some of the operations in `BasePackFetchConnection` can be skipped. We don't need to advertise packs, compute "wanted time" or wanted refs to send. All of those operations will try to read objects from an empty repository which always results in a missing object. This saves 99.9% of `LooseObjects.open()` calls which dramatically speeds up object negotiation in V2 protocol. In testing on JGit (v6.8.0.202311291450-r) repository, which contains 564 refs, the number of calls to `LooseObjects.open()` was reduced from 1187 to 1. Skipping a call to `markRefsAdvertised()` initially reduced be above number to 623. Then assuming "0" "want time" an on empty repository pushed the calls down to 312. Finally, skipping objects reachability on empty repository set calls down to 1. The last call is performed from `FetchProcess.asForIsComplete()` which probably needs to stay in place. Bug: jgit-5 Change-Id: I2480690726ea54d3b1593380bc8f8d15b4d6afc6
* | LooseObjects: Use File#exists when possibleDariusz Luksza2023-12-201-0/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When `trustFolderStat` flag is enabled we can use `File.exist()` instead of rethrowing `FileNotFoundException`. This improves performance of cloning and fetching. A simple benchmark that generates a random `ObjectId` instance and then tries to parse that object id, shows about 30% improvement with this change. The benchmark scenario was based on the stacktrace reported in jgit-5. Where `RevWalk.parse()` call will eventually call `LooseObjects.open()` and finally `LoseObjects.getOpenLoader()`. Results on `master`: (packFiles) Mode Cnt Score Error Units 10 avgt 2 137.400 us/op 100 avgt 2 1369.063 us/op 1000 avgt 2 13730.759 us/op 10000 avgt 2 137359.539 us/op 100000 avgt 2 1382627.641 us/op With this change: (packFiles) Mode Cnt Score Error Units 10 avgt 2 85.019 us/op 100 avgt 2 868.748 us/op 1000 avgt 2 8628.768 us/op 10000 avgt 2 86877.505 us/op 100000 avgt 2 863123.868 us/op Issue: jgit-5 Change-Id: I366acf629873a5c7577a1032490faf57685f98dd
* DfsReader: give subclasses visiblity over the pack bitmap indexIvan Frade2023-12-141-1/+14
| | | | | | | | | | | | Subclasses intercept many methods in DfsReader to capture metrics, but they cannot record stats from PackBitmapIndex, as it is wrapped inside a BitmapIndex. Move the creation of the BitmapIndex to a protected method. Subclasses can override it to e.g. read metrics from the index or set listeners to the BitmapIndex. Change-Id: I86c13b3ef88663d7faf59f2ec77df0a36b1627ed
* PackBitmapIndex/StoredBitmap: Expose size and countsIvan Frade2023-12-145-1/+295
| | | | | | | | | | | | | PackBitmapIndex holds a collection of StoredBitmaps. StoredBitmaps can be either base bitmaps (ready) or an XOR over another bitmap. XOR bitmaps are replaced with a resolved version on demand. Bitmaps can use a significant amount of memory but we don't have detailed visibility about it. Add methods to PackBitmapIndex to know how many xor/bases we have and their sizes. Change-Id: I57aa80a1f07ddf9223eb34cfda85aab85529ea9c
* PackWriter/Statistics: Remove the bitmapt hit statsIvan Frade2023-12-133-45/+0
| | | | | | | | | | | | | | The request uses bitmaps for reachability and to decide what to pack. Setting the listener in the PackWriter only covers the second case. Remove the listener from the PackWriter. It makes more sense to set it in the reader and at the moment the BitmapIndex only supports a single listener. This was introduced after the 6.8 tag, so it should be safe to remove. Change-Id: Ib4c0a805c70e54b6a9e7f78ccdb8e0a465d238f1
* Configure Github issue reportingThomas Wolf2023-12-102-0/+93
| | | | | | Add two forms for bug reports and feature requests. Change-Id: I8d80f2498741ba5bb88655d1e22798f99826fb7f
* Merge "API filter for PackStatistics.objectsWithBitmapsFound"Thomas Wolf2023-12-061-0/+8
|\
| * API filter for PackStatistics.objectsWithBitmapsFoundThomas Wolf2023-12-051-0/+8
| | | | | | | | | | | | The field was introduced in commit 5e563e1b. Change-Id: Ic2f495e79319ac6044bcabf253b63b8b631eec84
* | FooterLine: Protect from ill-formed messageKamil Musin2023-12-052-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A raw commit message has some headers and then the actual message. RawParseUtils.commitMessage returns the start position of the actual message, or -1 when the message is not raw. FooterLine is not handling this -1 and throws an IndexOutOfBounds exception. Consider than msgB can be -1 when looking for the beginning of the last paragraph. FooterLine javadoc and parameter talk only about "raw" but previous code accepted non-raw messages (used mostly in unit tests) so we need to keep this behavior. Change-Id: I4b88c507e210fdd200a85b01665c8524ab393b00
* | Merge "Document option gc.writeCommitGraph"Ivan Frade2023-12-051-0/+1
|\ \ | |/ |/|
| * Document option gc.writeCommitGraphMatthias Sohn2023-12-041-0/+1
| | | | | | | | Change-Id: Ic02d5abce18250b30f2c3f3741892d8cda251001
* | Merge "StartGenerator: Fix parent rewrite with non-default RevFilter"Ivan Frade2023-12-044-24/+123
|\ \
| * | StartGenerator: Fix parent rewrite with non-default RevFilterRonald Bhuleskar2023-12-044-24/+123
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | StartGenerator is responsible for propagating the RevWalk's parent rewrite setting, but it currently only does so when a non-default TreeFilter is set, when it should also do so if the default TreeFilter is used with a non-default RevFilter. Adding a new if condition within StartGenerator to enable parent rewrite with non-default RevFilter. TreeRevFilter relied on the old buggy functionality and has been modified to explicitly refrain from rewriting parents. Change-Id: I4e4ff67fb279edbcc3461496b132cea774fb742f
* / Update MANIFEST.MFPeter Kriens2023-12-041-1/+2
|/ | | | | Add an import for javax.net.ssl Signed-off-by: Peter Kriens <Peter.Kriens@aQute.biz>
* Bump last release version to 6.8.0.202311291450-rMatthias Sohn2023-12-041-1/+1
| | | | | | | This is the version used to compare API changes against to detect breaking API changes. Change-Id: I005b6a24c98c507656ebab415492a4127f08d471
* Prepare 6.9.0-SNAPSHOT buildsMatthias Sohn2023-12-0491-536/+536
| | | | Change-Id: Id1d784ec4870cfb53c4b140fe0bb3fad9eef651d
* Merge branch 'stable-6.8'Matthias Sohn2023-12-04111-573/+591
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.8: Prepare 6.8.1-SNAPSHOT builds JGit v6.8.0.202311291450-r Rename method parameter to fix warning about hidden field Fix warnings about empty control flow statements BitmapIndexImpl: externalize error message Suppress not-externalized string warnings Silence API error for new method BitmapIndex#addBitmapLookupListener Update Orbit to orbit-aggregation/2023-12 Prepare 6.8.0-SNAPSHOT builds JGit v6.8.0.202311212206-rc1 Change-Id: Ie88662f6458bb80147c7c164424eebd8b8240fc7
| * 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
| * | 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
* | | | BitmapWalkerTest: New test for the walkerIvan Frade2023-11-301-0/+161
| | | | | | | | | | | | | | | | Change-Id: I414f5bdd86e5623d7669fa187df19e06acd02cef
* | | | PackWriter: store the objects with bitmaps in the statisticsIvan Frade2023-11-302-2/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Use the listener interface of the BitmapWalker to get the objects walked with bitmaps and store them in the statistics. Change-Id: Id15a904eb642d7f50d80ac77d1146db4fe4706eb
* | | | FooterLine: First line cannot be a footerIvan Frade2023-11-292-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first line of the commit message cannot be a footer line. This restriction was dropped in commit [1] while adding multiline footers. This affects at least the git-numberer gerrit plugin, that even have a test for it [2]. Reintroduce the restriction that the first line of the commit message cannot be a footer and bring the test from git-numberer to jgit. [1] https://review.gerrithub.io/c/eclipse-jgit/jgit/+/1172664 [2] https://chromium.googlesource.com/infra/gerrit-plugins/git-numberer/+/refs/heads/main/src/test/java/com/googlesource/chromium/plugins/gitnumberer/GetFooterLinesTest.java Change-Id: Id3fa6b8614664dbc3fdccffe1006b0b9752a8de6
* | | | Reapply "Improve footer parsing to allow multiline footers."Ivan Frade2023-11-293-28/+81
| | | | | | | | | | | | | | | | This reverts commit e99fb6edc4b4eba43e27f9945df043e72ab297dd.
* | | | Revert "Improve footer parsing to allow multiline footers."Ivan Frade2023-11-293-81/+28
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 340cc787a0d14a0698d757a919ccd77e0a129fb0. This breaks a test in the git_numberer gerrit plugin used by chromium [1]. The test checks that first line is never a footer, which sounds right. That test should be included in FooterLineTest. [1] https://chromium.googlesource.com/infra/gerrit-plugins/git-numberer/+/refs/heads/main/src/test/java/com/googlesource/chromium/plugins/gitnumberer/GetFooterLinesTest.java
* | | 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