summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* JGit v7.3.0.202504081226-m1v7.3.0.202504081226-m1Matthias Sohn12 days89-123/+123
| | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I446e2d7370880f6270af55fbe37805a2b1d11e63
* Update mockito to 5.17.0Matthias Sohn13 days8-14/+14
| | | | Change-Id: I89566dc86106a77f8246a1b5d771f159434ce586
* Update jetty to 12.0.19Matthias Sohn13 days8-63/+63
| | | | Change-Id: Ia99311bf80ab6ce75f68e57f3b60cd56823b1d42
* Update bytebuddy to 1.17.5Matthias Sohn13 days8-21/+21
| | | | Change-Id: I9bc1151baa5f396ef40bf09cc564e73c6b378917
* tools/BUILD: Make AssertEqualsArgumentOrder a warningIvan Frade13 days1-1/+1
| | | | | | | | | | I don't know why this check kicked in now, but it is reporting errors in many tests. Reduce to warning (order of the expected/actual is not SO dramatic). We can fix the code and upgrade to error in following changes. Change-Id: I00ad9cac6c05494a662a8848813479a931f16caf
* PullCommandTest: remove unnecessary method referenceIvan Frade13 days1-1/+1
| | | | | | | | | [UnnecessaryMethodReference] This method reference is unnecessary, and can be replaced with the variable itself. Callable<PullResult> setup = target.pull()::call; Change-Id: I18fa05c4367fabef8960c235f0dd27333a29df76
* Merge "tests: avoid assertEquals on same instance"Ivan Frade13 days4-6/+6
|\
| * tests: avoid assertEquals on same instanceIvan Frade2025-03-254-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | [SelfAssertion] You are passing identical arguments to the assertEquals method, so this assertion always passes. THIS IS LIKELY A BUG! See https://errorprone.info/bugpattern/SelfAssertion Replacing assertEquals(x, x) with assertTrue(x.equals(x)). Change-Id: I4fd631adbee35e68ab59d92a2c67d5e3c821c537
* | Merge branch 'stable-7.2'Matthias Sohn14 days1-2/+2
|\ \ | |/ |/| | | | | | | | | * stable-7.2: Fix package name of spring boot JarLauncher class in jgit.sh Change-Id: I976dce16471a3788b2d8e3ef4fcbe37f6cfef21b
| * Fix package name of spring boot JarLauncher class in jgit.shstable-7.2Matthias Sohn2025-04-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | The class moved to this package in spring 3.2.0. See https://stackoverflow.com/questions/77279480/org-springframework-boot-loader-jarlauncher-cannot-be-found-but-org-springframe https://github.com/spring-projects/spring-boot/issues/37667 https://docs.spring.io/spring-boot/docs/3.2.0/reference/html/executable-jar.html#appendix.executable-jar.launching.manifest Bug: jgit-157 Change-Id: Ie1aaef2cd9443ee37b5ff6cd83fcd74e23b3e3fa
* | Update bytebuddy to 1.17.3Matthias Sohn2025-03-228-21/+21
| | | | | | | | Change-Id: I17a57b0e6075971f93aa9cbc01f3347947eee072
* | Update mockito to 5.16.1Matthias Sohn2025-03-228-14/+14
| | | | | | | | Change-Id: I2af5940dcde56f7de6d6390edce2b641183a2e70
* | Update jna to 5.17.0Matthias Sohn2025-03-228-21/+21
| | | | | | | | Change-Id: I4e0339428c3e859827710bd325b61785ff22fcb7
* | Update jetty to 12.0.18Matthias Sohn2025-03-228-63/+63
| | | | | | | | Change-Id: I5b0fa58f2319f26a852a0c6e13350816d8b57b77
* | Merge "SystemReader: Add support for XDG_CACHE_HOME"Ivan Frade2025-03-214-0/+42
|\ \
| * | SystemReader: Add support for XDG_CACHE_HOMEIvan Frade2025-03-214-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | In following changes we introduce a cache for the Blame CLI and it should follow the XDG standard for the location. Add support for XDG_CACHE_HOME following the XDG_CONFIG_HOME pattern. Change-Id: I622f7eb7ff942fafdb5c5da877d1fb1507d5e482
* | | Removed redundant TreeFilter.ANY_DIFF in LogCommand.youtirsin2025-03-201-3/+3
| | | | | | | | | | | | | | | | | | Change-Id: I2ecf5f6c220e88dcc3ec2bf132e71156cf0fe622 Signed-off-by: kylezhao <kylezhao@tencent.com> Signed-off-by: youtirsin <brocodzhang@tencent.com>
* | | Merge "Bump minimum dependency for Bouncy Castle to 1.80.0"Matthias Sohn2025-03-205-24/+34
|\ \ \ | |/ / |/| |
| * | Bump minimum dependency for Bouncy Castle to 1.80.0Thomas Wolf2025-03-205-24/+34
| | | | | | | | | | | | | | | | | | | | | | | | Add an extra dependency in o.e.j.ssh.apache to ensure BC 1.80.0 gets pulled in if the bundle is installed. Bug: jgit-148 Change-Id: I13c3365440bedb73251760bcf77907081e8ba1cf
* | | BlameResult: Let generator decide when to use the blame cacheIvan Frade2025-03-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BlameResult disables the blame cache in the generator, just in case the generator is setup for a reverse blame (where we cannot use the cache). This prevents the use of the cache by defaut in the Blame cli. The generator already takes care of disabling the cache in reverse blames, so this is unnecessary. Remove the forced disable and let the generator decide when it can use the cache. Change-Id: I451b46c3b88c83025276150253a5396ea59b9f54
* | | exttst: Pass encoding to InputStreamReaderIvan Frade2025-03-171-1/+1
|/ / | | | | | | | | | | errorprone was complaining about this lack of encoding in the test. Change-Id: I53916a3e3446d965a77393b6705fb86ecff0d931
* | Update last jgit release version to 7.2.0.202503040940-rThomas Wolf2025-03-161-1/+1
| | | | | | | | Change-Id: I63c2e3b73accb25fc52c68cb67cd5061b7ffc831
* | Merge "TreeRevFilter: enable Bloom Filter usage with ChangedPathTreeFilter"Ivan Frade2025-03-148-60/+725
|\ \
| * | TreeRevFilter: enable Bloom Filter usage with ChangedPathTreeFilterXing Huang2025-03-138-60/+725
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The paths relevant for a treewalk can be defined with hierarchy of tree filters. TreeRevFilter retrieves these paths from #getPathsBestEffort to apply them to the ChangePathFilter (bloom filters), however the plain list of paths cannot represent the And/Or/Not of the tree filter API (e.g. NOT(/a/b) or AND("/a", "/b")). Introduce a new TreeFilter method #shouldTreeWalk() to let the filters decide whether a set of tree entries need to be tree walked or can be discarded right away. Create a new ChangePathTreeFilter that can use changed path filters to determine shouldTreeWalk. Update TreeRevFilter to use a ChangePathTreeFilter, instead of getting paths and check the changed tree filters itself. Signed-off-by: Xing Huang <xingkhuang@google.com> Change-Id: I8edd0b8423f2bfb85b38d7f997f3cd8dad558bc8
* | | Update scm url in pom.xml to refer to gerrit homepage of jgit repoMatthias Sohn2025-03-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gitiles plugin on GerritHub is currently disabled do defend some ongoing DDoS attacks. Hence update the scm url to the gerrit homepage of the jgit repo so that contributors can find the clone command for cloning the jgit repo including the commit-msg hook needed to contribute via Gerrit. Bug: jgit-151 Change-Id: Idf1fd94c65d4092018e3907ccf6a0628551088ec
* | | Merge "Add target platform jgit-4.36 for eclipse 2025-06"Matthias Sohn2025-03-133-0/+321
|\ \ \
| * | | Add target platform jgit-4.36 for eclipse 2025-06Matthias Sohn2025-03-123-0/+321
| | | | | | | | | | | | | | | | Change-Id: Ifc77e7c5699759b36a070e886acade0db975355b
* | | | ReftableCompactor: Use instant to set the reflog expire timeIvan Frade2025-03-122-18/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reflog expire time is compared with the time in the PersonIdent. PersonIdent has moved to the java.time API and prefers the getWhenAsInstant() method. Use the Instant method in PersonIdent and propagate the use of Instant to the parameter and setter. Change-Id: I14cfdc93437971737dc7e472ca5c9885e2d37a13
* | | | GC: Use new java.time API in PersonIdentIvan Frade2025-03-121-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getWhen() is deprecated in PersonIdent. Move to the new getWhenAsInstant(). Take the change to use Instant for the lastRepackTime. Change-Id: Ib641211e7bbf8ff6947d81910c24b2640fbdb4e7
* | | | reftable.BlockWriter: Use time API methods from PersonIdentIvan Frade2025-03-121-2/+2
|/ / / | | | | | | | | | | | | | | | | | | Replace calls to deprecated methods in PersonIdent with their new versions. Change-Id: I8ca92df1de77e3a16d89ef4b97c77a6662555560
* | | Merge "Checkout: Handle InvalidRefNameException"Matthias Sohn2025-03-112-1/+25
|\ \ \ | |/ / |/| |
| * | Checkout: Handle InvalidRefNameExceptionSruteesh Kumar Paramata2025-03-102-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the checkout command is throwing InvalidRefNameException which is not being caught. This results in an exception visible to the user. This fix catches the exception and shows the user a meaningful message of what went wrong Bug: jgit-146 Change-Id: Iadb0feecba955912161444239a36a2fad201dc34
* | | BlameGenerator: Use cache only for candidates modifying the pathIvan Frade2025-03-102-33/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BlameGenerator is querying the cache on each candidate from the queue. i.e. on every commit in the history that contains the path. The cache call is expensive and, in long histories with poor cache coverage, the blame becomes slower than without cache. Query the cache afer we know the candidate modified the file but before doing the actual blame. In other words, ignore the cache if the commit doesn't modify the file. Compared with previous code, this skips the cache for the commit that creates the file and for the root commit (blame is that commit, so no performance loss). Change-Id: I0fd7279026a30505742527e84f13680b843ad4a3
* | | Update maven pluginsMatthias Sohn2025-03-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | - maven-deploy-plugin to 3.1.4 - maven-install-plugin to 3.1.4 - tycho to 4.0.12 Change-Id: I33fbe1f554e833c37cf886c88f6c8ec3c2275ba4
* | | Update spotbugs-maven-plugin to 4.9.2.0Matthias Sohn2025-03-081-1/+1
| | | | | | | | | | | | Change-Id: I5c9b6b564b1c2f9b6f2cd433e860b0243d958190
* | | Update mockito to 5.16.0Matthias Sohn2025-03-087-12/+12
| | | | | | | | | | | | Change-Id: Ifd3f974874bfdfdc792eee0be01be0f670ace6e3
* | | Update jetty to 12.0.17Matthias Sohn2025-03-087-54/+54
| | | | | | | | | | | | Change-Id: I2ea58b7375187f4794e866b360cd9f082347a66f
* | | Update bytebuddy to 1.17.2Matthias Sohn2025-03-087-18/+18
|/ / | | | | | | Change-Id: I660e95b5009a8ebd04bf8e61e4d71e20c21ede53
* | FileReftableDatabase: mark autoRefresh volatileMatthias Sohn2025-03-041-7/+6
| | | | | | | | | | | | | | using an AtomicReference isn't necessary since we just set or get the field and there is no set based on a get. Change-Id: I83bcfed73ed63ab69af80675f6002e67cadc13e8
* | Prepare 7.3.0-SNAPSHOT buildsMatthias Sohn2025-03-0489-548/+548
| | | | | | | | Change-Id: Id871f3084a8195fdfa2f7eab058515656bd2c9f9
* | Merge branch 'stable-7.2'Matthias Sohn2025-03-0492-550/+556
|\| | | | | | | | | | | | | | | | | | | * stable-7.2: Prepare 7.2.1-SNAPSHOT builds JGit v7.2.0.202503040940-r JGit v7.2.0.202503040805-r CacheRegion: fix non translatable text warnings Change-Id: I65296a4911042553e7329c1e02bc19143d97c547
| * Prepare 7.2.1-SNAPSHOT buildsMatthias Sohn2025-03-0489-548/+548
| | | | | | | | Change-Id: Iddc02bb3c2235b491d9b7034f29591b09d042e11
| * JGit v7.2.0.202503040940-rv7.2.0.202503040940-rMatthias Sohn2025-03-0489-123/+123
| | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I3d3f7fc6732b3204970a7be7886361920d8ec60e
| * JGit v7.2.0.202503040805-rMatthias Sohn2025-03-0489-123/+123
| | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: Ie3159a6610f3a1425c3b812f8284c073ee2b429c
| * CacheRegion: fix non translatable text warningsMatthias Sohn2025-03-043-2/+8
|/ | | | Change-Id: I163957653b075f1f05a6219f4d23b340588ffcbd
* Merge branch 'master' into stable-7.2Matthias Sohn2025-03-0428-913/+363
|\ | | | | | | | | | | | | | | | | | | | | | | * master: Ensure access to autoRefresh is thread-safe FileReftableStack: use FileSnapshot to detect modification FileReftableDatabase: consider ref updates by another process BlameRegionMerger: report invalid regions with checked exception. [ssh known_hosts] Handle unknown keys better [releng] Remove unused target platform definitions Change-Id: I2e49d582a5be9f1383b4f1713e33cb378b4f6118
| * Ensure access to autoRefresh is thread-safeMatthias Sohn2025-03-031-6/+7
| | | | | | | | Change-Id: I7651613c33803daf00882a543dbf0c3f836110fa
| * FileReftableStack: use FileSnapshot to detect modificationMatthias Sohn2025-03-034-4/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reading file attributes is faster than reading file content hence use FileSnapshot to speedup detecting if FileReftableStack is up-to-date. Introduce new option "core.trustTablesListStat" allowing to configure if we can trust file attributes of the "tables.list" file to speedup detection of file modifications. This file is used to store the list of filenames of the files storing Reftables in FileReftableDatabase. If this option is set to "ALWAYS" we trust File attributes and use them to speedup detection of file modifications. If set to "NEVER" the content of the "tables.list" file is always read unconditionally. This can help to avoid caching issues on some filesystems. If set to "AFTER_OPEN" we will open a FileInputStream to refresh File attributes of the "tables.list" file before relying on the refreshed File attributes to detect modifications. This works on some NFS filesystems and is faster than using "NEVER". Change-Id: I3e288d90fb07edf4fa2a03c707a333b26f0c458d
| * FileReftableDatabase: consider ref updates by another processMatthias Sohn2025-03-036-1/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FileReftableDatabase didn't consider that refs might be changed by another process e.g. using git (which started supporting reftable with version 2.45). Add a test creating a light-weight tag which is updated using git running in another process and assert that FileReftableDatabase recognizes the tag modification. FileReftableStack#addReftable checks if the stack is up-to-date while it holds the FileLock for tables.list, if it is not up-to-date the RefUpdate fails with a LOCK_FAILURE to protect against lost ref updates if another instance of FileReftableDatabase or another thread or process updated the reftable stack since we last read it. If option `reftable.autoRefresh = true` or `setAutoRefresh(true)` was called check before each ref resolution if the reftable stack is up-to-date and, if necessary, reload the reftable stack automatically. Calling `setAutoRefresh(true)` takes precedence over the configured value for option `reftable.autoRefresh`. Add a testConcurrentRacyReload which tests that updates still abort ref updates if the reftable stack the update is based on was outdated. Bug: jgit-102 Change-Id: I1f9faa2afdbfff27e83ff295aef6d572babed4fe
| * BlameRegionMerger: report invalid regions with checked exception.Ivan Frade2025-02-272-2/+2
| | | | | | | | | | | | | | | | | | | | If the cached regions are invalid the merger throws an IllegalStateException. This is too strict. The caller can just continue working as if there was no cache. Report the error as IOException, that the caller can catch and handle. Change-Id: I19a1061225533b46d3a17936912a11000430f2ce