Skip to main content
summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-11-26Merge branch 'stable-5.1' into stable-5.2David Pursehouse3-5/+7
* stable-5.1: Bazel: Use java_plugin and java_binary from @rules_java in jmh.bzl Bazel: Add missing newlines at end of BUILD files Change-Id: Ic1dc84a6c4a1cf430d329627642583fd6e0d0eaa Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-11-26Bazel: Use java_plugin and java_binary from @rules_java in jmh.bzlDavid Pursehouse1-3/+5
Change-Id: I80456f74bc17a1ebb0248fce8050a4cb07bf18f1 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-11-26Bazel: Add missing newlines at end of BUILD filesDavid Pursehouse2-2/+2
Change-Id: I11afc45141da988e28382898246995f6b45eb09c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-11-06Merge branch 'stable-5.1' into stable-5.2Matthias Sohn1-146/+164
* stable-5.1: Fix benchmark pom.xml to include distribution managment config Change-Id: I20e8b7155397771b1bc77e628f535f27458a24bb
2019-11-06Fix benchmark pom.xml to include distribution managment configMatthias Sohn1-146/+164
Also fix indentation. Change-Id: I6d223c493d537bb8aac23c7ddf0a602aff22a3c2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-11-05Merge branch 'stable-5.1' into stable-5.2Matthias Sohn23-0/+1322
* stable-5.1: Run JMH benchmarks using bazel Benchmark for creating files and FileSnapshots Implement benchmark for looking up FileStore of a given Path JMH benchmark for SimpleLruCache Remove unused API problem filters Silence API errors for new API added since 5.1.0 Change-Id: If91c55a192d3b2c441d9c8d414f2e24a7261b1b6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-11-05Run JMH benchmarks using bazelMatthias Sohn4-0/+121
The benchmarks can be built and run using bazel by running: $ bazel run //org.eclipse.jgit.benchmarks:benchmarks Change-Id: I6679750eaa0f2be30ed9d45036e013b0ea4fcc86 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-11-05Benchmark for creating files and FileSnapshotsMatthias Sohn1-0/+111
Change-Id: I953fd8b6b9743b0b9cada244331253eb2121784d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-11-05Implement benchmark for looking up FileStore of a given PathMatthias Sohn1-0/+97
Results on Mac OS 10.14.6 using APFS: Result "org.eclipse.jgit.benchmarks.LookupFileStoreBenchmark.testLookupFileStore": 44583.277 ±(99.9%) 2666.096 ns/op [Average] (min, avg, max) = (43707.073, 44583.277, 45320.685), stdev = 692.377 CI (99.9%): [41917.181, 47249.373] (assumes normal distribution) Secondary result "org.eclipse.jgit.benchmarks.LookupFileStoreBenchmark.testLookupFileStore:·stack": Stack profiler: ....[Thread state distributions]........................................................ 100.0% RUNNABLE ....[Thread state: RUNNABLE]............................................................. 42.5% 42.5% sun.nio.fs.UnixNativeDispatcher.realpath0 37.9% 37.9% sun.nio.fs.UnixNativeDispatcher.stat0 11.0% 11.0% sun.nio.fs.BsdNativeDispatcher.getfsstat 7.6% 7.6% sun.nio.fs.BsdNativeDispatcher.fsstatEntry 0.7% 0.7% sun.nio.fs.BsdNativeDispatcher.endfsstat 0.1% 0.1% sun.nio.fs.UnixPath.initOffsets 0.0% 0.0% sun.nio.fs.UnixFileAttributes.get 0.0% 0.0% java.util.zip.Inflater.inflateBytes 0.0% 0.0% sun.misc.Unsafe.compareAndSwapInt 0.0% 0.0% sun.nio.fs.BsdFileStore.findMountEntry This shows that FS.attrCacheByPath should be useful to reduce overhead of looking up the FileStore of a given file. Change-Id: I7213086b42e0453f0ee149660d507dac2a4644cc Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-11-05JMH benchmark for SimpleLruCacheMatthias Sohn17-0/+993
See [1] for JMH documentation and [2] how to use JMH in Eclipse. The benchmarks pom currently cannot use the JGit parent pom due to an ecj bug [3] regarding annotation processing. Hence for now do not inherit from the JGit parent pom and copy the compiler plugin configuration for javac from the parent pom. After running the Maven build the benchmark can be run using Maven: $ java -jar org.eclipse.jgit.benchmarks/target/benchmarks.jar or in Eclipse by running the main method of the SimpleLruCacheBenchmark class. [1] https://openjdk.java.net/projects/code-tools/jmh/ [2] http://alblue.bandlem.com/Page/3/index.html [3] https://eclip.se/532029 CQ: 20517 CQ: 20518 Change-Id: Idca8a9e0980f0b8a9c741c4c9e97d03c62f07c8d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-11-04Update API problem filtersMatthias Sohn3-74/+27
- filter errors for new APIs added in service release - remove unused filters Change-Id: Ifbf532b8a3c46d4ed78a38f6c75073a072b7f669 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-11-04Remove unused API problem filtersMatthias Sohn1-28/+0
Change-Id: I0ae0fd4919b7ccc5218c6eb0fab22350bb9c9714 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-11-04Silence API errors for new API added since 5.1.0Matthias Sohn3-0/+27
Change-Id: I92a7c1b0319d61aeb25f58048bd07c144068c3db Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-10-11Merge branch 'stable-5.1' into stable-5.2Matthias Sohn1-1/+1
* stable-5.1: Bazel: Bump bazel version to 1.0.0 Change-Id: I067d8ebd15f35f139d86bc67473b42afac4f0f53
2019-10-11Bazel: Bump bazel version to 1.0.0David Pursehouse1-1/+1
Change-Id: I607915af0556efe8b2fb640e9387029b755d1a7f Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-10-02Merge branch 'stable-5.1' into stable-5.2Matthias Sohn1-4/+2
# By Matthias Sohn (2) and Saša Živkov (1) * stable-5.1: Prepare 5.1.13-SNAPSHOT builds JGit v5.1.12.201910011832-r Do not rely on ArrayIndexOutOfBoundsException to detect end of input Change-Id: Iaae4b171eaa0081f9142489de8df94ab455d65f7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-10-01Prepare 5.1.13-SNAPSHOT buildsMatthias Sohn56-359/+359
Change-Id: Ic1dca14924f49ad07eb5cd0570ce7ece9f319d0d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-10-01JGit v5.1.12.201910011832-rv5.1.12.201910011832-rMatthias Sohn56-59/+59
Change-Id: I69fef9b2cdc18bbf1c8b9b290fb3d190684be13c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-27Do not rely on ArrayIndexOutOfBoundsException to detect end of inputSaša Živkov1-4/+2
In the Config#StringReader we relied on ArrayIndexOutOfBoundsException to detect the end of the input. Creation of exception with (deep) stack trace can significantly degrade performance in case when we read thousands of config files, like in the case when Gerrit reads all external ids from the NoteDb. Use the buf.length to detect the end of the input. Change-Id: I12266f25751373a870ce3fa623cf2a95d882d521
2019-09-16Merge branch 'stable-5.1' into stable-5.2Matthias Sohn3-18/+307
* stable-5.1: WorkingTreeIterator: handle different timestamp resolutions Change-Id: Ic33ebec963af03a182dfe8f46486f5e8d00c0694 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-16WorkingTreeIterator: handle different timestamp resolutionsThomas Wolf3-18/+307
Older JGit stored only milliseconds timestamps in the index. Newer JGit may get finer timestamps from the file system. This leads to slow index diffs when a new JGit runs against an index produced by older JGit because many timestamps will differ and JGit will then do many content checks. See [1]. Handle this migration case by only comparing milliseconds if the index entry has only millisecond precision. The inverse may also occur; also compare only milliseconds if the file timestamp has only millisecond precision. Do the same also for microsecond resolution. On Windows, NTFS may provide 100ns resolution and may be used by external programs writing the index, but Java's WindowsFileAttributes may provide only microseconds. File timestamp precision in Java depends not only on the Java APIs used by different JGit versions but may also change when running the same Java code on different VMs. And of course the resolution may vary among operating and file systems. Moreover, timestamp precision in the index depends on the program that wrote the index. Canonical git may use a different resolution, maybe even different between git versions. [1] https://www.eclipse.org/forums/index.php/t/1100344/ Change-Id: Idfd08606c883cb98787b2138f9baf0cc89a57b56 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-10Merge branch 'stable-5.1' into stable-5.2Matthias Sohn1-2/+3
* stable-5.1: Fix WorkingTreeIterator.compareMetadata() for CheckStat.MINIMAL Change-Id: Ic4ee37fb36f61dc7707391f768bf78a33094bfd3 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-10Fix WorkingTreeIterator.compareMetadata() for CheckStat.MINIMALMatthias Sohn1-2/+3
If CheckStat is MINIMAL or timestamps have no nanosecond part WorkingTreeIterator.compareMetaData only checks the second part of timestamps and ignores nanoseconds which may have ended up in the index by using native git. If fileLastModified.getEpochSecond() == cacheLastModified.getEpochSecond() we currently proceed comparing fileLastModified and cacheLastModified with full precision which is wrong since we determined that we detected reduced timestamp resolution. Fix this and also handle smudged index entries for CheckStat.MINIMAL. Change-Id: I6149885903ac63d79b42d234cc02aa4e19578f3c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-08Merge branch 'stable-5.1' into stable-5.2Matthias Sohn4-5/+5
* stable-5.1: Format BUILD files with buildifier Change-Id: I5a8413470fd0fbb6db3ca553f455b3e3dc10ab33 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-08Format BUILD files with buildifierDavid Pursehouse4-5/+5
Using buildifier from master branch and the command: $ buildifier -r -lint fix -warnings all . Change-Id: I19c8ff183081093cb73bed7221a78a91b6cba4dc Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-09-08[error prone] Suppress NonAtomicVolatileUpdate in SimpleLruCacheMatthias Sohn1-2/+7
We don't need to update time atomically since it's only used to order cache entries in LRU order. Change-Id: I756fa6d90b180c519bf52925f134763744f2c1f1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-08Bazel: Format BUILD files with buildifierDavid Pursehouse2-2/+2
Change-Id: I8b4abf67fba592be42b2b5b029fa0e972d746dcb Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-09-08Bazel: Add fixes for --incompatible_load_java_rules_from_bzlDavid Pursehouse3-0/+5
Change-Id: Ifc47ae22209fdb7a5d7bede4da002640ed26a43a Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-09-07Merge branch 'stable-5.1' into stable-5.2Matthias Sohn24-146/+36
* stable-5.1: Bazel: Fix warning about deprecated lib.bzl Format lib/BUILD with buildifier Bazel: Add fixes for --incompatible_load_java_rules_from_bzl Bazel: Bump minimum supported version to 0.29.0 Bazel: Bump skylib library version to 0.8.0 Use bazelisk to switch between used bazel version Bazel: Require minimum bazel version 0.17.1 Fix wrong placeholder index in error message packInaccessible JGitText: Remove unused externalized strings RepoText: Remove unused externalized string CLI: Remove unused externalized strings Change-Id: Iea37a8e39e9d4872dc607c9222dcf191ce4e4757 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-07Bazel: Fix warning about deprecated lib.bzlDavid Pursehouse1-1/+1
Change-Id: Ifdbaaf9ec020a621070eea351f791a819d554012 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-09-07Format lib/BUILD with buildifierDavid Pursehouse1-2/+2
Change-Id: I4f0ad64371b160b67797f49b9fde521e5dea9396 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-09-07Bazel: Add fixes for --incompatible_load_java_rules_from_bzlDavid Pursehouse16-0/+28
Change-Id: I24746335db132bf20f400cb3db400737596d4542 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-09-07Bazel: Bump minimum supported version to 0.29.0David Ostrovsky2-2/+2
Change-Id: I069e56deb964624791bb0aa3ae095629adfe3bbb Signed-off-by: David Ostrovsky <david@ostrovsky.org>
2019-09-07Bazel: Bump skylib library version to 0.8.0David Ostrovsky1-3/+3
Change-Id: I2089899c9f197b2c93b93390fdd55f6fe11e5ce4 Signed-off-by: David Ostrovsky <david@ostrovsky.org>
2019-09-07Use bazelisk to switch between used bazel versionDavid Ostrovsky1-0/+1
Bazelisk is utility to switch to the right Bazel version, that we used to have with Buck build tool: [1]. Bazelisk will download the right Bazel version only once and will use it in subsequent calls: $ bazelisk build :release 2019/06/06 16:22:15 Downloading \ https://releases.bazel.build/0.26.1/release/bazel-0.26.1-linux-x86_64... Bazelisk is storing the binaries in user's cache directory: [2], e.g. on Linux OS: $ ls -1 ~/.cache/bazelisk/bin bazel-0.26.1-linux-x86_64 * [1] https://github.com/bazelbuild/bazelisk * [2] https://golang.org/pkg/os/#UserCacheDir Change-Id: Ia9180fb75f8cc17a0a0232622cf33a13bfad6b60 Signed-off-by: David Ostrovsky <david@ostrovsky.org>
2019-09-07Bazel: Require minimum bazel version 0.17.1David Pursehouse1-0/+13
Check the bazel version using the checker from bazel_skylib, and require at least version 0.17.1 which is the minimum version that does not suffer from the Java API mismatch issue [1]. The implementation is borrowed from the Gerrit project. [1] https://github.com/bazelbuild/bazel/issues/6027 Change-Id: I224250088a1f5072fcaa3ec81228f4d2cb8cb389 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-09-06Fix wrong placeholder index in error message packInaccessibleMatthias Sohn1-1/+1
See: https://www.eclipse.org/lists/jgit-dev/msg03850.html Change-Id: I0e121a2b7ac399f4a663fa49ab330d27363e9a55 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-06JGitText: Remove unused externalized stringsDavid Pursehouse2-132/+0
Change-Id: I995d7a1b6ab2866221eee9f5cb828b97192daf4a Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-09-06RepoText: Remove unused externalized stringDavid Pursehouse2-2/+0
Change-Id: Ida47637f54afdb76513be9b04aae32107567d4e3 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-09-06CLI: Remove unused externalized stringsDavid Pursehouse2-8/+0
Change-Id: Id44117dd72b0e71e9bf0046a3c965eeae64cf3ea Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-09-03Merge branch 'stable-5.1' into stable-5.2Matthias Sohn6-88/+162
* stable-5.1: Prepare 5.1.12-SNAPSHOT builds JGit v5.1.11.201909031202-r Prepare 4.11.10-SNAPSHOT builds JGit v4.11.9.201909030838-r Bazel: Update bazlets to the latest master revision Bazel: Remove FileTreeIteratorWithTimeControl from BUILD file BatchRefUpdate: repro racy atomic update, and fix it Delete unused FileTreeIteratorWithTimeControl Fix RacyGitTests#testRacyGitDetection Change RacyGitTests to create a racy git situation in a stable way Silence API warnings Change-Id: Iac5dc9683cea97db04d20f27c10f2e103d3ae7b5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-03Prepare 5.1.12-SNAPSHOT buildsMatthias Sohn56-359/+359
Change-Id: I353ac3f23024063722abc7340bc9a6df3c615741 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-03JGit v5.1.11.201909031202-rv5.1.11.201909031202-rMatthias Sohn56-59/+59
Change-Id: I288acf670160b9bcd2d04f572a902b5838b4d4f8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-03Merge branch 'stable-5.0' into stable-5.1Matthias Sohn6-88/+116
* stable-5.0: Prepare 4.11.10-SNAPSHOT builds JGit v4.11.9.201909030838-r Bazel: Update bazlets to the latest master revision Bazel: Remove FileTreeIteratorWithTimeControl from BUILD file BatchRefUpdate: repro racy atomic update, and fix it Delete unused FileTreeIteratorWithTimeControl Fix RacyGitTests#testRacyGitDetection Change RacyGitTests to create a racy git situation in a stable way Silence API warnings Change-Id: I172136a031ff0730e575327cafb3527c9650a71d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-03Merge branch 'stable-4.11' into stable-5.0stable-5.0Matthias Sohn10-273/+186
* stable-4.11: Prepare 4.11.10-SNAPSHOT builds JGit v4.11.9.201909030838-r Bazel: Update bazlets to the latest master revision Bazel: Remove FileTreeIteratorWithTimeControl from BUILD file BatchRefUpdate: repro racy atomic update, and fix it Delete unused FileTreeIteratorWithTimeControl Fix RacyGitTests#testRacyGitDetection Change RacyGitTests to create a racy git situation in a stable way Silence API warnings Change-Id: Ifb6a4dbea2f48fd2ffa66eb737d61920aefedfbd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-03Prepare 4.11.10-SNAPSHOT buildsstable-4.11Matthias Sohn56-356/+356
Change-Id: Ic98bd87d96ce627d38e1ecc2c3cb28b517ab489e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-03JGit v4.11.9.201909030838-rv4.11.9.201909030838-rMatthias Sohn56-59/+59
Change-Id: Ie60468569074197d49e19cbd0ffaedfe88f3d74e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-03Merge branch 'stable-4.10' into stable-4.11Matthias Sohn8-269/+215
* stable-4.10: Bazel: Update bazlets to the latest master revision Bazel: Remove FileTreeIteratorWithTimeControl from BUILD file BatchRefUpdate: repro racy atomic update, and fix it Delete unused FileTreeIteratorWithTimeControl Fix RacyGitTests#testRacyGitDetection Change RacyGitTests to create a racy git situation in a stable way Silence API warnings Change-Id: If672b4f0c350f4e8ff7e1e706485cffd8137236d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-03Merge branch 'stable-4.9' into stable-4.10stable-4.10Matthias Sohn2-2/+1
* stable-4.9: Bazel: Update bazlets to the latest master revision Bazel: Remove FileTreeIteratorWithTimeControl from BUILD file Change-Id: I8bb74aacc1c010cfed9a0c8acffb520724f0e395 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-03Merge branch 'stable-4.9' into stable-4.10Matthias Sohn5-271/+165
* stable-4.9: BatchRefUpdate: repro racy atomic update, and fix it Delete unused FileTreeIteratorWithTimeControl Fix RacyGitTests#testRacyGitDetection Change RacyGitTests to create a racy git situation in a stable way Silence API warnings Change-Id: Id5bf44645655fca40ad22bb1f1ad20a7c2e8f6db Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>

Back to the top