summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Use ShutdownHook to gracefully handle JVM shutdownMatthias Sohn2023-09-126-54/+39
| | | | | | | | | | in all classes which already registered their own shutdown hook - CloneCommand - GC#PidLock - FS#FileStoreAttributes - LocalDiskRepositoryTestCase#Cleanup Change-Id: I3efc1f83f3cbbf43eeeaaedcd2bee1ef31971a72
* Add ShutdownHook to cleanup FileLocks on graceful JVM shutdownMatthias Sohn2023-09-124-0/+161
| | | | | | | | | | | | | | | This should avoid stale lock files if the JVM is terminated gracefully. Implement a ShutdownHook which can register/unregister listeners which need to do some cleanup during graceful JVM shutdown. This hook is registered as a Java shutdown hook and when the JVM shuts down calls #onShutdown of registered listeners using a parallel stream to let them run concurrently. See https://docs.oracle.com/javase/8/docs/technotes/guides/lang/hook-design.html Bug: 582379 Change-Id: I1621dc5f7d9a8c832b6d1b74cbc47578b1c2f0b8
* Unregister ShutdownHook when GC#PidLock is closedMatthias Sohn2023-09-121-2/+11
| | | | | | | Otherwise the JVM will accumulate the ShutdownHook objects of all GCs run while the JVM is up. Change-Id: Iadc723a939238a3a75b4ba47f898918eb4554ea3
* Merge "OSGi: move plugin localization to subdirectory"Matthias Sohn2023-09-1249-37/+51
|\
| * OSGi: move plugin localization to subdirectoryThomas Wolf2023-09-1249-37/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OSGi can have its plugin localization at an arbitrary place; there is no need to have it in a top-level plugin.properties file. In non-OSGi environments having the files at the root level may mean that these files clash with each other, or, as in the referenced bug, with some third-party plug-in's plugin.properties, which may not even have anything to do with localization. Move our OSGi localization to a subfolder OSGI-INF/l10n. For OSGi environments, that's just as good, and for non-OSGi environments it avoid clashes with other root level items on the classpath or in a fat JAR. For fragments, use neither plugin.properties (which would clash with the host plug-in's plugin.properties) nor fragment.properties (which might clash with other fragments for the same fragment host bundle). Instead use names "relative" to the host bundle. Bug: 582394 Change-Id: Ifbcd046d912e2cfe86c0f7259c5ca8de599d9aa1 Signed-off-by: Thomas Wolf <twolf@apache.org>
* | ssh: Remove redundant null check for home.getAbsoluteFile()Jonathan Nieder2023-09-111-1/+1
|/ | | | | | | | | | | | | | | File#getAbsoluteFile is non-nullable, so this check can never trigger. Worse, getAbsoluteFile can throw an exception such as InvalidPathException, and since this call isn't in the "try" block that checks for that, the exception would then escape the getSession call. Noticed because the exception is being thrown in googlesource.com's custom SshdSessionFactory, causing incoming ssh requests to fail (noticed using internal tests). Change-Id: I57f2d5e497ff678b17573f79827b6e1d9a6c9b9f Signed-off-by: Jonathan Nieder <jrn@google.com>
* RevertCommand: support for inserting a Gerrit change IDThomas Wolf2023-09-082-1/+55
| | | | | | | Add a setter for the flag to be passed through to the CommitCommand. Bug: 342790 Change-Id: I87548d7c2742af8af5ef6105115e3ab9c58d1d9f Signed-off-by: Thomas Wolf <twolf@apache.org>
* [releng] Bump japicmp base version to 6.7.0.202309050840-rThomas Wolf2023-09-081-1/+1
| | | | Change-Id: I8ccf8472a8bf06669ebdcd3d59d24f7d5567d89e Signed-off-by: Thomas Wolf <twolf@apache.org>
* DfsPackFile: Record index loads only in one placeIvan Frade2023-09-081-8/+8
| | | | | | | | | | | | | | Each index can be set in the reader from two locations: the dfs cache callback or the code afterwards. The pack is emitting the load event in both cases, when the reference is set. This is brittle (right now it is missing events for BITMAP_INDEX and COMMIT_GRAPH). Emit the index loaded event only once, after going through the cache code. The fact that the reference was set in the callback or the main code is irrelevant. Also, the reader is per-thread, so there shouldn't be any concurrency involved triggering double counts. Change-Id: I7f3d078a53741ecc1e81b96353ed8faa8fef3a49
* DfsPackfile: Emit the index load with the index objectIvan Frade2023-09-081-8/+8
| | | | | | | | | | The DfsReader#emitIndexLoad expects a reference to the loaded object, not to its identity hash. This makes listeneres recalculate an identity hash over an Int object. Pass the expected reference to the method. Change-Id: Iee982fdd0169c93c5c7cd9cfe4260a7a82d23f6a
* Prepare 6.8.0-SNAPSHOT buildsMatthias Sohn2023-09-0791-535/+535
| | | | Change-Id: Ifc81f0a96c2ced0b25926b9daa539d9cfc951925
* Merge branch 'stable-6.7'Matthias Sohn2023-09-07131-800/+1702
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.7: Prepare 6.7.1-SNAPSHOT builds Switch back to wagon-ssh-external Fix generation of maven site JGit v6.7.0.202309050840-r Remove unused API problem filters [releng] Bump japicmp base version to 6.6.0.202305301015-r Fix list of 3rd party bundles in p2 repo Add missing source bundle org.osgi.service.cm.source to target platform Prepare 6.6.2-SNAPSHOT builds JGit v6.6.1.202309021850-r Checkout: better directory handling Document commit-graph options supported by JGit Fix warning raised for local variable hiding DfsPackFile#index Suppress boxing warnings in DfsPackFile Remove unused API problem filters Suppress boxing warnings in tests Fix warning about empty block Update mockito to 5.5.0 Update byte-buddy to 1.14.7 Prepare 6.7.0-SNAPSHOT builds JGit v6.7.0.202308301100-rc1 Change-Id: Ib2a1000ead5ca6cf3816e9e9496ad5d92f4dc963
| * Prepare 6.7.1-SNAPSHOT buildsMatthias Sohn2023-09-0791-535/+535
| | | | | | | | Change-Id: I96097ef8c6f198220f513bbc6d5f8881834a1491
| * Switch back to wagon-ssh-externalMatthias Sohn2023-09-072-2/+2
| | | | | | | | | | Bug: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/2818 Change-Id: Ic283e5229b1a8a0b1ae349555ac7cfb7b046d7be
| * Fix generation of maven siteMatthias Sohn2023-09-072-6/+31
| | | | | | | | | | | | | | | | | | - update maven-site-plugin to 4.0.0-M9 - use wagon-ssh extension for deployment - disable doclint - don't fail the build for javadoc warnings Change-Id: I81f7229deaf6892416ce4cebd6c122f00a857d51
| * JGit v6.7.0.202309050840-rv6.7.0.202309050840-rMatthias Sohn2023-09-0591-125/+125
| | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: Ibe952d97bc178adb909cdd40f48957f5b68af699
| * Remove unused API problem filtersMatthias Sohn2023-09-051-33/+0
| | | | | | | | Change-Id: If37ac92711cef94a835cfd303997a3d129d212ac
| * [releng] Bump japicmp base version to 6.6.0.202305301015-rThomas Wolf2023-09-041-1/+1
| | | | | | | | Change-Id: I5392537713d4909d4fc2fee6e2b21502e0674b43 Signed-off-by: Thomas Wolf <twolf@apache.org>
| * Fix list of 3rd party bundles in p2 repoMatthias Sohn2023-09-041-3/+12
| | | | | | | | | | | | | | | | | | | | | | The jgit p2 repo should contain all 3rd party dependencies needed at runtime but not dependencies only used in tests. - remove assertj-core since it's only used in tests - add org.eclipse.osgi and org.osgi.service.cm which are runtime dependencies Change-Id: Ie789cb8feab0905e7e23aae1d5378e82a0088992
| * Add missing source bundle org.osgi.service.cm.source to target platformMatthias Sohn2023-09-0414-13/+27
| | | | | | | | Change-Id: I6e61278467ad11d28c08ee6b49e04dac0593f3e6
| * Merge branch 'stable-6.6' into stable-6.7Matthias Sohn2023-09-0318-149/+1044
| |\ | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.6: Prepare 6.6.2-SNAPSHOT builds JGit v6.6.1.202309021850-r Checkout: better directory handling Change-Id: Ice82d68b2d343a5fac214807cdb369e486481aab
| | * Prepare 6.6.2-SNAPSHOT buildsMatthias Sohn2023-09-0391-533/+533
| | | | | | | | | | | | Change-Id: Id4e2fbefc49115c7e3de26a34cfbe01ba6de25b2
| | * JGit v6.6.1.202309021850-rv6.6.1.202309021850-rMatthias Sohn2023-09-0391-125/+125
| | | | | | | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I4f173dc9d634e0c9f31305961400b6b35a0a332f
| | * Checkout: better directory handlingThomas Wolf2023-09-0318-149/+1044
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Merge branch 'master' into stable-6.7Matthias Sohn2023-09-021-0/+3
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | * master: CommitGraphWriter: throw exception on unknown chunk Change-Id: Iaa0c563917c4195fccd57f5e6839a37008c9b808
| * | | Document commit-graph options supported by JGitMatthias Sohn2023-09-011-0/+8
| | | | | | | | | | | | | | | | Change-Id: I0ab1b826232bbfcf28518d7a01ae5c5d82a08e04
| * | | Fix warning raised for local variable hiding DfsPackFile#indexMatthias Sohn2023-08-311-3/+3
| | | | | | | | | | | | | | | | Change-Id: I45cd3be942f798d51af1e024ceb3f4d26c7af324
| * | | Suppress boxing warnings in DfsPackFileMatthias Sohn2023-08-311-0/+8
| | | | | | | | | | | | | | | | Change-Id: I4b5a0a7ffdeaf7d7839787aa8b98ea9c72f70850
| * | | Remove unused API problem filtersMatthias Sohn2023-08-311-27/+0
| | | | | | | | | | | | | | | | Change-Id: I96b73a948794ab5aaadaa558ae75b512f54d64fe
| * | | Suppress boxing warnings in testsMatthias Sohn2023-08-312-0/+2
| | | | | | | | | | | | | | | | Change-Id: I56731862b0955286f86b1c0699d75313eb192fdf
| * | | Fix warning about empty blockMatthias Sohn2023-08-311-0/+1
| | | | | | | | | | | | | | | | Change-Id: I569fb9bf39e851bca451e5a35539589766ba5c05
| * | | Update mockito to 5.5.0Matthias Sohn2023-08-3116-30/+30
| | | | | | | | | | | | | | | | Change-Id: Ic62864aaf15388b8f20b2db8aa65d1dcf03465a6
| * | | Update byte-buddy to 1.14.7Matthias Sohn2023-08-3115-44/+44
| | | | | | | | | | | | | | | | Change-Id: Iee257eef4cdc3235db6172e19d8d271ff9988fa4
| * | | Prepare 6.7.0-SNAPSHOT buildsMatthias Sohn2023-08-3091-125/+125
| | | | | | | | | | | | | | | | Change-Id: I49751232464e70b7d1dc3292a9f36b7a7015e44f
| * | | JGit v6.7.0.202308301100-rc1v6.7.0.202308301100-rc1Matthias Sohn2023-08-3091-125/+125
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I712a9f6830364ed404d03f3a145c055906273544
| * | | Merge branch 'master' into stable-6.7Matthias Sohn2023-08-3065-473/+1690
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: Remove the cbi-snapshots Maven repository Update Orbit to orbit-aggregation/release/4.29.0 Add target platform for Eclipse 2023-09 (4.29) Use release p2 repo for Eclipse 2023-06 (4.28) Update tycho to 4.0.2 Update jmh to 1.37 Update bouncycastle to 1.76 Fix some tests in ConfigTest Handle global git config $XDG_CONFIG_HOME/git/config IO: use JDK convenience methods org.eclipse.jgit.junit.ssh/.settings/.api_filters: fix unclosed tags ReadChangedPathFilter: fix Non-externalized string literal warning Introduce core.packedIndexGitUseStrongRefs config key DfsReader: Make PackLoadListener interface visible to subclasses DfsGarbageCollector: provide commit graph stats DfsGarbageCollector: put only GC commits into the commit graph DfsReader: Expose when indices are loaded Change-Id: Idd78a0a1bc3cd3db5edb475e235c13354d9087a9
* | \ \ \ Merge "CommitGraphWriter: Make the list of chunks immutable"Ivan Frade2023-09-061-1/+2
|\ \ \ \ \
| * | | | | CommitGraphWriter: Make the list of chunks immutableIvan Frade2023-09-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The chunk list is calculated before start writing and it is immutable afterwards. Make this explicit using an unmodifiable list for the chunks. Change-Id: I4a5cfb1f3d06a9393d8d93a3fac3c128cf3faec0
* | | | | | Ensure home directory not null before using in SshdsessionfactoryMinh Thai2023-09-061-4/+6
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | Home directory might not be set in DFS. Change-Id: I3528685838065dc291826fc73a37126af7bf47ce
* | | / / CommitGraphWriter: Assert written bytesIvan Frade2023-09-051-0/+12
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | The final size of the commit-graph is known before-hand. As a safety-net, assert the written size matches the expected value. Change-Id: Ib0828a7cce5bacb33f6325ee3910f4eebd95eb8c
* | | | CommitGraphWriter: throw exception on unknown chunkIvan Frade2023-09-011-0/+3
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CommitGraphWriter first defines the chunks and then writes them. If at write time a chunk is unknown, it is ignored. This is brittle: if somebody adds a chunk to the header but not to the actual writing, the commit-graph is broken and there is no error reported anywhere. Throw exception if at write time a chunk is unknown. This can only happen by a coding error in the writer. Change-Id: Iade677bb6ce368b6941b75a21c622917afa3b751
* | | Remove the cbi-snapshots Maven repositoryMatthias Sohn2023-08-302-8/+0
| | | | | | | | | | | | | | | | | | since it's not used anymore. Change-Id: I884c5e5854d6a1f5b104d8d3bb0419e860fa34ca
* | | Update Orbit to orbit-aggregation/release/4.29.0Matthias Sohn2023-08-3032-202/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch to bundle dependencies for hamcrest 1.3 to avoid issues with split packages in that version. Don't allow hamcrest 2.x yet since junit 4.13.2 still requires hamcrest 1.3. See Orbit restructuring in https://github.com/orgs/eclipse-orbit/discussions/49 Change-Id: I8faf519b8f2c4e4a6bd255d694d1aa28017acd85
* | | Add target platform for Eclipse 2023-09 (4.29)Matthias Sohn2023-08-302-0/+278
| | | | | | | | | | | | Change-Id: I62f9bacebf0a2a2cba6ffde7936572e3f05a629c
* | | Use release p2 repo for Eclipse 2023-06 (4.28)Matthias Sohn2023-08-302-3/+3
| | | | | | | | | | | | Change-Id: I3b8794bdb43db12c2eacda1de27651686c41abf5
* | | Update tycho to 4.0.2Matthias Sohn2023-08-291-1/+1
| | | | | | | | | | | | Change-Id: Ib619bc09bf79c0f9e7526c0303606f314e8c1209
* | | Update jmh to 1.37Matthias Sohn2023-08-292-4/+4
| | | | | | | | | | | | Change-Id: I39e3dda1c13268c44055295398eab36c5ff7eb3e
* | | Update bouncycastle to 1.76Matthias Sohn2023-08-2915-74/+74
| | | | | | | | | | | | Change-Id: Ic569f348106e917001fbaa25a302fc20cca56244
* | | Fix some tests in ConfigTestMatthias Sohn2023-08-291-4/+12
| | | | | | | | | | | | | | | | | | | | | Some of the ConfigTest tests created a FileRepositoryBuilder but didn't use it to actually create a FileRepository. Change-Id: I1a4b27891daee1b235a71e7bbf2a7588b9d11a53
* | | Handle global git config $XDG_CONFIG_HOME/git/configThomas Wolf2023-08-286-4/+443
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C git uses this alternate fallback location if the file exists and ~/.gitconfig does not. Implement this also for JGit. If both files exist, reading behavior is as if the XDG config was inserted between the HOME config and the system config. Writing behaviour is different: all changes will be applied only in the HOME config. Updates will occur in the XDG config only if the HOME config does not exist. This is consistent with the behavior of C git; compare [1], especially the sections on FILES and SCOPES, and the description of the --global option. [1] https://git-scm.com/docs/git-config Bug: 581875 Change-Id: I2460b9aa963fd2811ed8a5b77b05107d916f2b44 Signed-off-by: Thomas Wolf <twolf@apache.org>