summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge "TreeRevFilter: correct changedPathFilter usage for multi-paths inclusion"jonathantanmy2024-03-193-6/+33
|\
| * TreeRevFilter: correct changedPathFilter usage for multi-paths inclusionXing Huang2024-03-183-6/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The expected behavior of TreeRevFilter when filtering multiple file paths is to include commits that changed at least one of the given paths; only skipping them if they did not change any of the given paths. The current changedPathFilter utilization logic is skipping a commit if there exists at least one given path that the commit did not change, disregarding the rest of the given paths. Enforcing all given paths to be checked by the changedPathFilter, only skipping a commit if changedPathFilter return negative on all given paths. Signed-off-by: Xing Huang <xingkhuang@google.com> Change-Id: Ib7a9e496b37ec737722fbf33c5d0f05d5d910a8d
* | Merge "CleanupService: preload JgitText if not running in OSGi"Thomas Wolf2024-03-182-18/+49
|\ \ | |/ |/|
| * CleanupService: preload JgitText if not running in OSGiThomas Wolf2024-03-152-18/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Load class JGitText eagerly when ShutdownHook is used. If not running in an OSGi framework, the hook executes as a JVM shutdown hook. Normally classloading in a shutdown hook should not be a problem, but there are some other frameworks besides OSGi that may close classloaders before such a JVM shutdown hook runs, for instance Plexus classworlds used in maven. This is not a full fix for classloading problems in JGit shutdown hooks. If a listener causes additional classes to be loaded, there may still be problems. But the current listeners registered with ShutdownHook all appear to use only classes that should already be loaded; except JGitText. Bug: jgit-36 Change-Id: Iab00134b4720adb19e1394c38ad79f1c43c3466b Signed-off-by: Thomas Wolf <twolf@apache.org>
* | PathFilterGroup: implement getPathsBestEffort()Xing Huang2024-03-183-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | getPathsBestEffort() is a method in the TreeFilter class to retrieve file paths specified by the caller. PathFilterGroup do not propagate the paths of their subfilters as it does not implement the getPathsBestEffort() method, resulting in the caller only getting an empty list of paths. Override getPathsBestEffort() in PathFilterGroup to propagate subfilter values. Signed-off-by: Xing Huang <xingkhuang@google.com> Change-Id: I76bf08795360abc0874a7c258636d4f37da35060
* | DfsPackFile: get commitGraph.readChangePaths from repo configXing Huang2024-03-143-1/+74
| | | | | | | | | | | | | | | | | | | | | | By default, CommitGraphLoader reads the readChangedPaths flag from SystemReader ignoring the values set at repo-level. Read the value of the property from the repo configuration and pass it to CommitGraphLoader. Signed-off-by: Xing Huang <xingkhuang@google.com> Change-Id: I34c807714c5a7573769ba9d611457aa107006244
* | Merge "CommitGraphLoader: receive readChangedPaths as parameter"Ivan Frade2024-03-121-11/+40
|\ \
| * | CommitGraphLoader: receive readChangedPaths as parameterXing Huang2024-03-121-11/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commitGraph.readChangedPaths controls the read of bloom filter chunks from commit graph. CommitGraphLoader uses SystemReader to read this conf, so it only sees its value when it is set in $XDG_CONFIG_HOME/jgit/config (and not, for example, in the repo config). Pass the readChangedPaths value to the method that reads the commit graph. Callers should read the value from the right configuration. This change is a noop, but allows to move callers to the new method progressively. Follow up changes will remove the previous method and its usages. Signed-off-by: Xing Huang <xingkhuang@google.com> Change-Id: If10c9b758fbe0498c7bd1e6ac1cda8869682f16d
* | | Merge "Add pull request template discouraging usage of pull requests"Matthias Sohn2024-03-111-0/+5
|\ \ \
| * | | Add pull request template discouraging usage of pull requestsMatthias Sohn2024-03-111-0/+5
| | |/ | |/| | | | | | | | | | | | | since we use Gerrit for code review. Change-Id: I2eeea82452d678564e17e3db9bd6ca7ef4ae4cc2
* / | Update CONTRIBUTING.md to point to GitHub issuesAntonin Delpeuch2024-03-101-1/+3
|/ / | | | | | | | | | | | | | | | | With a link to older bugs in Bugzilla. I have no idea if this is an accurate description of the situation, it's all guesswork on my part. Signed-off-by: Antonin Delpeuch <antonin@delpeuch.eu> Change-Id: I019689115a744daf588a86b44e998d2dfe03d4b5
* | Merge "ShutdownHook: run on bundle deactivation if in OSGi"Matthias Sohn2024-03-096-20/+118
|\ \
| * | ShutdownHook: run on bundle deactivation if in OSGiThomas Wolf2024-03-086-20/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running as a JVM shutdown hook is far too late in an OSGi framework; by the time the JVM shuts down, the OSGi framework will normally already have deactivated and unloaded bundles, and thus the JGit cleanup code may try to work with unloaded classes for which there will be no classloader anymore. When JGit is used in an OSGi framework, the cleanups must run on bundle deactivation, not on JVM shut down. Add a declarative OSGi service CleanupService. This is a normal Java class that has no dependencies on any OSGi bundle or interface, but that is declared in the MANIFEST.MF and in an OSGi Service XML as an OSGi immediate component. Set the bundle activation policy to "lazy". (A declarative service is used instead of a bundle activator because the latter would need to implement the OSGi interface BundleActivator, but JGit should not have dependencies on OSGi.) When JGit runs in an OSGi framework, the framework will create an instance of CleanupService through the no-args constructor when (and before) the first class from this bundle is loaded. This instance thus knows that it is operating in OSGi, and will run the ShutdownHook when the bundle is deactivated: bundle deactivation will deactivate the CleanupService instance. When JGit does not run in an OSGi framework, the OSGi service declaration will be ignored, and there will be no already existing CleanupService instance. We create one lazily, which thus knows that it is not operating in OSGi, and which will use a JVM shutdown hook to run the ShutdownHook. This also reverts commit e6d83d61eade6dee223757d149a4df9650752a55. Bug: jgit-36 Change-Id: I9c621b0707453c087f638974312ea1bf8ec30c31 Signed-off-by: Thomas Wolf <twolf@apache.org>
* | | FS_POSIX.runInShell(): on MacOS use a login shellThomas Wolf2024-03-091-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Mac, $PATH for UI programs is not the same as in a shell (terminal). It is typically much shorter. This may lead to surprises when hooks that work fine via the command-line git do not work when run via JGit in a UI application, such as EGit in Eclipse. Therefore use a login shell to run hooks and other commands spawned by git if we're on MacOS. This will give the hooks the same environment as in a terminal. Bug: egit-16 Change-Id: Id2e5485c6d3080d3ef8baa61ad7f6f198f77c590 Signed-off-by: Thomas Wolf <twolf@apache.org>
* | | [ssh] Implement the "Ciphers" SSH configThomas Wolf2024-03-093-4/+92
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream will remove the CBC algorithms aes128-cbc, aes192-cbc, and aes256-cbc from the server's KEX proposal in the next release. Removal of these algorithms by default in the client is planned for the release after that. These CBC algorithms were found vulnerable back in 2008,[1] and OpenSSH does not propose them: server-side since 2014, client-side since 2017. It is _highly_ unlikely that the removal of these algorithms by default would affect any JGit user. Nevertheless, let's give users a way to explicitly specify ciphers (including enabling deprecated algorithms) via their ~/.ssh/config file. [1] https://www.kb.cert.org/vuls/id/958563 Change-Id: I7444861df3a7f526277fef2485773a20ac74ae8a Signed-off-by: Thomas Wolf <twolf@apache.org>
* | [diffmergetool] Fix running command on CygwinThomas Wolf2024-03-071-3/+3
| | | | | | | | | | | | | | | | Because FS_Win32_Cygwin is a subclass of FS_Win32 the "instanceof" test for Cygwin must come first. Bug: jgit-34 Change-Id: If0cc0fa77e7aa0ce680289cecf808bc8859911a1 Signed-off-by: Thomas Wolf <twolf@apache.org>
* | [releng] Bump japicmp base version to 6.9.0.202403050737-rThomas Wolf2024-03-071-1/+1
| | | | | | | | Change-Id: I6008ef632e6cd88d337ac5b888b52a4b1d3ca85f Signed-off-by: Thomas Wolf <twolf@apache.org>
* | DfsBlockCache: move cache table specific implementations to a new classLaura Hamelin2024-03-053-551/+933
| | | | | | | | | | | | | | | | | | | | | | | | | | This move of the cache table specific implementation to its own class and extracting the method definition to an interface will allow for additional reworking of the dfs block cache with the goal of letting users implement their own context specific cache tables. This work does not intend to change how the dfs block cache is accessed, limiting the change to DfsBlockCache internal changes only. Change-Id: Ief6755d1dcf54b4f73f9fe8d22ccb9e2952cb0c4 Signed-off-by: Laura Hamelin <haowl@google.com>
* | Prepare 6.10.0-SNAPSHOT buildsMatthias Sohn2024-03-0589-534/+534
| | | | | | | | Change-Id: Ie728ef9a7d3c6430a5da30f6a61afd2176015748
* | Merge branch 'stable-6.9'Matthias Sohn2024-03-0589-534/+534
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.9: Prepare 6.9.1-SNAPSHOT builds JGit v6.9.0.202403050737-r JGit v6.9.0.202403050045-r Prepare 6.9.0-SNAPSHOT builds JGit v6.9.0.202402281855-rc1 Prepare 6.9.0-SNAPSHOT builds JGit v6.9.0.202402211805-m3 Change-Id: I08175c3bced7f94507a4def8fbf58c7d570e353c
| * | Prepare 6.9.1-SNAPSHOT buildsMatthias Sohn2024-03-0589-534/+534
| | | | | | | | | | | | Change-Id: I10f901209be2faa34ebb9355c86c2106bac38ba5
| * | JGit v6.9.0.202403050737-rv6.9.0.202403050737-rMatthias Sohn2024-03-0589-123/+123
| | | | | | | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I70494c0c69ac549dea9b4cf7c5b25e94c1b4b250
| * | JGit v6.9.0.202403050045-rv6.9.0.202403050045-rMatthias Sohn2024-03-0589-123/+123
| | | | | | | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I4c7a6542ad4252c5a9499e69f68650d2026bde40
| * | Merge branch 'master' into stable-6.9Matthias Sohn2024-03-054-0/+60
| |\ \ | |/ / |/| | | | | | | | | | | | | | * master: Introduce core.trustLooseRefStat config Change-Id: I373138c4334d94b3e1e4335ee555b68f907d4c89
* | | Introduce core.trustLooseRefStat configKaushik Lingarkar2024-03-054-0/+60
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With repositories on NFS, JGit can read an old value of a loose ref or miss the existence of a loose ref if file attributes of the loose ref or its parent directories are cached by NFS. Introduce a new config 'core.trustLooseRefStat' that will optionally refresh file attributes of the loose ref (at least on some NFS clients). Possible values for this new config are: * always: Trust loose ref file attributes (default) * after_open: Similar to 'always', but refresh the file attributes of the loose ref and its parent directories before trusting it The default is set to always trust the file attributes as after_open is known to degrade performance. In a subsequent change, SnapshottingRefDirectory will be updated to cache the directories that were refreshed to avoid duplicate work and thereby improve performance to some extent for the after_open setting. Change-Id: I9dfaeaf5307b2b51ce6ee4bfd9e0678786685fcf Signed-off-by: Kaushik Lingarkar <quic_kaushikl@quicinc.com>
| * Prepare 6.9.0-SNAPSHOT buildsMatthias Sohn2024-03-0589-123/+123
| | | | | | | | Change-Id: Ifadeead735c8772e58dd4e5c7381b44c5221a295
| * JGit v6.9.0.202402281855-rc1v6.9.0.202402281855-rc1Matthias Sohn2024-02-2889-123/+123
| | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I23d489ccdc257a8c25da4b90dc51d4a8951d320c
| * Merge branch 'master' into stable-6.9Matthias Sohn2024-02-2814-288/+384
| |\ | |/ |/| | | | | | | | | | | | | | | | | | | | | * master: Update SECURITY.md DfsObjDatabase: Let object database instantiate DfsPackFiles DfsPackFile: Abstract the bitmap loading to support other backends Remove unused API problem filters Support public key in IdentityFile Revert "StartGenerator: Fix parent rewrite with non-default RevFilter" DfsReader#getObjectSize: use size index if possible Change-Id: I60244aec1e44fe5b757a9b7ccb320697e0dc9b29
* | Merge "Update SECURITY.md"Matthias Sohn2024-02-281-30/+23
|\ \
| * | Update SECURITY.mdMatthias Sohn2024-02-281-30/+23
| | | | | | | | | | | | | | | | | | | | | | | | Use the text of the general Eclipse Vulnerability Reporting page at https://www.eclipse.org/security. Bug: jgit-31 Change-Id: I07dcf83199956e0173f958356661ade33252dab4
* | | DfsObjDatabase: Let object database instantiate DfsPackFilesIvan Frade2024-02-263-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DfsPackfile used to have only one constructor and it is invoked from 3 locations. Now we can construct DfsPackFiles with different bitmap loaders, so it is helpful to concentrate the instantiation in one location. Create DfsPackFile instances in the object database. This let subclasses choose how to initialize those instances. Change-Id: Ibb2ad86865154b6e7f0d5d26e8f533e0b5586246
* | | DfsPackFile: Abstract the bitmap loading to support other backendsIvan Frade2024-02-262-26/+168
|/ / | | | | | | | | | | | | | | | | | | | | | | Current code reads the bitmap index from the pack extension and loads all bitmaps into memory, with its IO and memory cost. We could consider to store the bitmaps on e.g. a database and load them on demand. Abstract the loading of the PackBitmapIndex in an interface that can be implemented with other backends. Change-Id: Ib5f64d05954708ea5325feea7088a8df229b36a5
* | Remove unused API problem filtersMatthias Sohn2024-02-251-30/+0
| | | | | | | | Change-Id: I0d81fda5edde5348e765eebc39bd9293fba51e91
* | Merge "Support public key in IdentityFile"Thomas Wolf2024-02-231-14/+45
|\ \
| * | Support public key in IdentityFileKonrad Windszus2024-02-221-14/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Public keys in the SSH configuration's "IdentityFile" are used for example by Password Managers like KeePassXC (https://keepassxc.org/docs/#faq-ssh-agent-auth-errors) or 1Password (https://developer.1password.com/docs/ssh/agent/advanced/#match-key-with-host) to match keys in the SSH agent with specific hosts. Bug: jgit-25 Change-Id: I33d47057d9dd54d3d08ba5bb17f730435ac93dac
* | | Merge "DfsReader#getObjectSize: use size index if possible"Ivan Frade2024-02-232-62/+104
|\ \ \
| * | | DfsReader#getObjectSize: use size index if possibleIvan Frade2024-02-202-62/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getObjectSize reads the size from the first bytes of the object in the pack, using IO. For blobs and depending on the configuration, the size could be available in the object size index. Try to get the size from the object size index if available. Read from the pack otherwise. Note that GC uses #getObjectSize from the existing pack to write the next object size index. Change-Id: Ia999290c06d061cb53aa8c0a2b28b1a9761567ef
* | | | Merge "Revert "StartGenerator: Fix parent rewrite with non-default RevFilter""Ivan Frade2024-02-224-123/+24
|\ \ \ \
| * | | | Revert "StartGenerator: Fix parent rewrite with non-default RevFilter"Ivan Frade2024-02-214-123/+24
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit db5ce6b5c24408ae27eb6fa0b6289d51b129baeb. Reason to revert: This change utilizes the RewriteGenerator even in absence of a path, making the walk lengthy. Change-Id: I5ffa6e8fead328191348c1e46828bf8c75ae1e42
| | | * Prepare 6.9.0-SNAPSHOT buildsMatthias Sohn2024-02-2289-123/+123
| | | | | | | | | | | | | | | | Change-Id: I11f4871bfdf6c6c0de5d5ed577edf16bac8cf681
| | | * JGit v6.9.0.202402211805-m3v6.9.0.202402211805-m3Matthias Sohn2024-02-2189-123/+123
| |_|/ |/| | | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: Id2f3934947d6d1e94feeb9e73ad7282ae089b682
* | | Merge branch 'stable-6.8'Matthias Sohn2024-02-215-10/+36
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.8: Delete org.eclipse.jgit.ssh.apache.agent/bin/.project Allow to discover bitmap on disk created after the packfile Change-Id: I08095dfaefb963876d993383cb35acc6b75d7691
| * \ \ Merge branch 'stable-6.7' into stable-6.8Matthias Sohn2024-02-215-10/+36
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.7: Delete org.eclipse.jgit.ssh.apache.agent/bin/.project Allow to discover bitmap on disk created after the packfile Change-Id: I01749bae6f46d1a8ebd25b890e667cc092f3a659
| | * \ \ Merge branch 'stable-6.6' into stable-6.7Matthias Sohn2024-02-216-38/+36
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.6: Delete org.eclipse.jgit.ssh.apache.agent/bin/.project Allow to discover bitmap on disk created after the packfile Change-Id: I2bbc8c9a4ed45d37fa7ba63b2afd5511b6cf47a2
| | | * | | Delete org.eclipse.jgit.ssh.apache.agent/bin/.projectMatthias Sohn2024-02-211-28/+0
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If2f50f81ffb8b5a1929b0ce403bff017ece29e2f
| | | * | | Allow to discover bitmap on disk created after the packfileLuca Milanesio2024-02-205-10/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the bitmap file was created *after* a packfile had been loaded into the memory, JGit was unable to discover them. That happed because of two problems: 1. The PackDirectory.getPacks() does not implement the usual while loop that is scanning through the packs directory as in the other parts of JGit. 2. The scan packs does not look for newly created bitmap files if the packfile is already loaded in memory. Implement the normal packfiles scanning whenever the PackDirectory needs to return a list of packs, and make sure that any reused Pack object would have its associated bitmap properly refreshed from disk. Adapt the assertions in GcConcurrentTest with the rescanned list of Pack from the objects/packs directory. Bug: jgit-15 Change-Id: I2ed576cefd78a0e128b175228a59c9af51523d7b
* | | | | | Update jetty to 10.0.20Matthias Sohn2024-02-2018-143/+143
| |_|_|/ / |/| | | | | | | | | | | | | | Change-Id: Ic79c5ce718fe1345f75c4254a9ee2aa7d91af359
* | | | | Update maven pluginsMatthias Sohn2024-02-203-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - build-helper-maven-plugin to 3.5.0 - cyclonedx-maven-plugin to 2.7.11 - eclipse-jarsigner-plugin to 1.4.3 - git-commit-id-maven-plugin to 7.0.0 - japicmp-maven-plugin to 0.18.5 - maven-clean-plugin to 3.3.2 - maven-compiler-plugin to 3.12.1 - maven-enforcer-plugin to 3.4.1 - maven-jxr-plugin to 3.3.2< - maven-site-plugin to 4.0.0-M13 - spotbugs-maven-plugin to 4.8.3.1 - tycho plugins to 4.0.6 Change-Id: Ie792f783b8b8453a37743f10f8c4162932e5ff85
* | | | | Update org.assertj:assertj-core to 3.25.3Matthias Sohn2024-02-2018-34/+34
| | | | | | | | | | | | | | | | | | | | Change-Id: I3fd8adf3c1cc3f2c8826602b11d1d11fdfe29bfb
* | | | | Update org.mockito:mockito-core to 5.10.0Matthias Sohn2024-02-2018-34/+34
| | | | | | | | | | | | | | | | | | | | Change-Id: I35dbb2402e65753e10bef4617b7e1683f9900406