summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* DescribeCommand: Consistenly omit the default valueSebastian Schuberth2019-05-311-1/+1
| | | | | | | | Omit the default value of "false" for "useTags" like already done for "longDesc". Change-Id: I25aaacae028fc8cf27f4040ba45fe79609318aa1 Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
* Remove excess blank line in FileUtilsTestMatthias Sohn2019-05-311-1/+0
| | | | Change-Id: I0d617feb7baacf9917b1da605fcb75f7d4ccd184 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* PacketLineIn: Add helper methods to check for END and DELIMDavid Pursehouse2019-05-302-6/+31
| | | | | | | | | These methods will allow clients to check for END and DELIM without doing a reference comparison on the String objects, which raises warnings from Error Prone. Change-Id: I9e7e59843553ed4488ee8e864033198bbb60d67c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* UploadPackTest: Rename variable to avoid hiding class memberDavid Pursehouse2019-05-301-4/+4
| | | | | Change-Id: I9e02642b2f56a735681e58b8c8d6e3545ef9093b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* UploadPackTest: Add missing <> operator on instantiation of ArrayListDavid Pursehouse2019-05-301-1/+1
| | | | | Change-Id: I348cbcd75252d7857ada843dc496d445ee1d62fb Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* BitmapCalculator: javadoc fixesIvan Frade2019-05-271-1/+2
| | | | | | | | | | Fill out the description of when IOException is thrown. Also fix a typo in the description for IncorrectObjectTypeException. Change-Id: I9fafd19d68ddc4fe4e95e8516c2c38484b941a3a Signed-off-by: Ivan Frade <ifrade@google.com> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* RevWalkUtils: add progress callback to findBranchesReachableFromAndrey Loskutov2019-05-253-1/+43
| | | | | | | | | | Offer a version of findBranchesReachableFrom method with progress monitor callback. This is required to allow UI clients to cancel long running operations and show progress. Bug: 547642 Change-Id: I31d1de54dbaa6ffb11e03da4c447963e8defa1d0 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
* Merge branch 'stable-5.4'David Pursehouse2019-05-241-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | * stable-5.4: SystemReader: Respect passed-in parent when no system config is present Prepare 5.4.0-SNAPSHOT builds JGit v5.4.0.201905221418-m3 Prepare 5.4.0-SNAPSHOT builds JGit v5.4.0.201905081430-m2 Change-Id: If69cb0afe9915b926d977e4ad26c7d72db31667c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * Merge branch 'stable-5.3' into stable-5.4David Pursehouse2019-05-241-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | * stable-5.3: SystemReader: Respect passed-in parent when no system config is present Change-Id: I758ed0c2a3527ffcf6255158a49090aba090e942 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | * SystemReader: Respect passed-in parent when no system config is presentDave Borowitz2019-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default implementation of openSystemConfig has special handling for when the FS returns null from getGitSystemConfig: it should return a "real" FileBasedConfig instance that never actually tries to load a file. However, this codepath was not respecting the passed-in parent config. Change-Id: Id0bcdc93bb42f9ebe3f5ee4c6b4be8863e0133f9
| * | Prepare 5.4.0-SNAPSHOT buildsMatthias Sohn2019-05-2272-103/+103
| | | | | | | | | | | | | | | Change-Id: I9df6fccee253d4087f9afab4cb46e0a40b8a5699 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | JGit v5.4.0.201905221418-m3v5.4.0.201905221418-m3Matthias Sohn2019-05-2272-103/+103
| | | | | | | | | | | | | | | Change-Id: I8a7e687acfcf8c341abd726ae60b5ee173422215 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Merge branch 'master' into stable-5.4Matthias Sohn2019-05-22112-1242/+1675
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: ReachabilityCheckers: @since 5.4 Update Orbit to S20190521195709 for 2019-06 M3 Tune max heap size for tests GPG: check that the key found is a signing key GPG: use key fingerprint suffix to compare id for signing key Recognize ReachabilityCheckerTestCase as helper UploadPack: restore inadvertently deleted line UploadPack: Use reachability checker to validate non-advertised wants Bazel: Simplify names of bouncy castle libraries Convert to lambda or member reference BitmappedReachabilityChecker: Reachability check using bitmaps BitmapCalculator: Get the reachability bitmap of a commit ReachabilityChecker: Default implementation with a RevWalk Change-Id: I323c460853230abcffa94c4f34f15dbaff8c330c
| * | | Prepare 5.4.0-SNAPSHOT buildsMatthias Sohn2019-05-1572-103/+103
| | | | | | | | | | | | | | | | | | | | Change-Id: Ieb4b049972509631f06b5268a90f432a1b9ee207 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | JGit v5.4.0.201905081430-m2v5.4.0.201905081430-m2Matthias Sohn2019-05-0872-103/+103
| | | | | | | | | | | | | | | | | | | | Change-Id: I535a98d8ef507d3c8cda7b0f042a2ae835da1279 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Upgrade maven-source-plugin to 3.1.0David Pursehouse2019-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I8253e75f5038b6c0e2205d74683e0ebd9839dd33 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | Upgrade maven-jar-plugin to 3.1.2David Pursehouse2019-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I9a291390205ee8c44b02c4081f2d8f17635d90ec Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | Upgrade jacoco-maven-plugin to 0.8.4David Pursehouse2019-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: Ibab24e1f5eefdc14bcf9ab6d72eab7e0a0cfaad9 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | BitmapCalculator and its test: add missing license headerMatthias Sohn2019-05-232-0/+84
| | | | | | | | | | | | | | | | Change-Id: I3c4a8b1e9159b0553aa95213bb82628370b6c036 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | RevWalk: new method createReachabilityChecker()Ivan Frade2019-05-224-11/+21
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Every caller would need to check if bitmaps are available in the repo to instantiate a reachability checker. Offer a method to create the reachability checker in the walk: the caller has already a walk over the repo, and the walk has all the information required. This allows us to make the implementation classes package-private. Change-Id: I355e47486fcd9d55baa7cb5700ec08dcc230eea5 Signed-off-by: Ivan Frade <ifrade@google.com>
* | | ReachabilityCheckers: @since 5.4Ivan Frade2019-05-223-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | The new ReachabilityChecker interface and its implementations are marked as @since 5.5, but they will make it to the 5.4 release. Change-Id: I88c31b3300ccf35d18c35faddb2517f0a57bdcfd Signed-off-by: Ivan Frade <ifrade@google.com>
* | | Update Orbit to S20190521195709 for 2019-06 M3Matthias Sohn2019-05-2215-83/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | Update - org.apache.ant to 1.10.6.v20190516-0412 (CQ 19829) - org.apache.httpcomponents.httpclient to 4.5.6.v20190503-0009 CQ: 19829 Change-Id: Ia057d4f07dab21374ca66c3d87a2bab1c795562c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Tune max heap size for testsMatthias Sohn2019-05-228-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an attempt to fix crashes observed on the new Jenkins infrastructure running on Kubernetes [1]. Increase it to 512m for - org.eclipse.jgit.ant.test - org.eclipse.jgit.http.test - org.eclipse.jgit.lfs.server.test - org.eclipse.jgit.lfs.test - org.eclipse.jgit.pgm.test Decrease it to 768m for - org.eclipse.jgit.test [1] e.g. https://ci-staging.eclipse.org/jgit/job/stable/job/jgit.gerrit/16074/console Change-Id: Id074ed0f7bcb8a13da649a547342af2a08439d9f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | GPG: check that the key found is a signing keyThomas Wolf2019-05-213-0/+10
| | | | | | | | | | | | | | | | | | Throw an exception if not. Change-Id: I60f36b271d5f44c6dc475302b169cb5b8a1e3945 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | GPG: use key fingerprint suffix to compare id for signing keyThomas Wolf2019-05-211-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check whether the value of the git config user.signingKey is a suffix of the full fingerprint of the key. This was already used for finding keys in secring.gpg, but not in pubring.kbx. This mechanism allows a user to use any unique suffix to identify keys; to avoid needless collisions it's recommended to use at least the last 16 characters of the hex representation of the fingerprint, which is the key id.[1] [1] https://tools.ietf.org/html/rfc4880#section-12.2 Bug: 545673 Change-Id: If6fb4879502b6ee4b8c26c21b2714aeac4e4670c Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | Merge "Recognize ReachabilityCheckerTestCase as helper"Jonathan Nieder2019-05-201-0/+1
|\ \ \
| * | | Recognize ReachabilityCheckerTestCase as helperJonathan Tan2019-05-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4e196faa1b ("ReachabilityChecker: Default implementation with a RevWalk", 2019-05-15) added ReachabilityCheckerTestCase but did not add it as a test helper in the corresponding BUILD file, making tests no longer runnable with Bazel. Resolve this issue. Change-Id: Iccc00b0d169dbaa137e130ce2ddd1b7669960b52 Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
* | | | UploadPack: restore inadvertently deleted lineJonathan Tan2019-05-201-0/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 7b96bd812e ("UploadPack: Use reachability checker to validate non-advertised wants", 2019-05-16), a "walk.setRetainBody(false);" statement was inadvertently deleted. (An earlier version of this commit had this line in another part of the code and a review comment suggested to move it back here; the line was then deleted from the other part of the code but not readded.) Restore this line. Change-Id: I96ff6106ba9e4eef429388c83e898b3363295f69 Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
* | | Merge changes from topic 'reachability-2'Jonathan Tan2019-05-209-44/+914
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: UploadPack: Use reachability checker to validate non-advertised wants BitmappedReachabilityChecker: Reachability check using bitmaps BitmapCalculator: Get the reachability bitmap of a commit ReachabilityChecker: Default implementation with a RevWalk
| * | | UploadPack: Use reachability checker to validate non-advertised wantsIvan Frade2019-05-161-44/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In "Reachable commit" request validators, we need to check that a "want" in the request, that hasn't been advertised, is reachable from the refs visible to the user. Current code has intermixed the translation of ObjectIds to RevCommits (and its error handling) with the actual walk, with the delegation to bitmaps in restricted circunstances. Refactor the code to make it "flatter" and more readable. Move ObjectIds to RevCommits translation to its own functions. Use the reachability checker instead of a newly defined walk. Before the non-advertised wants were validated with bitmaps only if any "want" refered to an non-commit. Now they will be validated with bitmaps also if the "wants" refer all to commits. Change-Id: Ib925a48cde89672b07a88bba4e24d0457546baff Signed-off-by: Ivan Frade <ifrade@google.com>
| * | | BitmappedReachabilityChecker: Reachability check using bitmapsIvan Frade2019-05-152-0/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "basic" reachability check walks the graph starting from the tips marking things as "uninteresting". If the target commit is marked as "uninteresting" it was reached; it is reachable from those tips. This requires a lot of walking and can be solved directly with bitmaps. Most of the time the bitmaps are already calculated or a short walk away. This should improve the performance of reachability checks, for example in Gitiles. Change-Id: I83d33271f58d95d2dc9ed151967b3eda513c99f7 Signed-off-by: Ivan Frade <ifrade@google.com>
| * | | BitmapCalculator: Get the reachability bitmap of a commitIvan Frade2019-05-152-0/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To make reachability checks with bitmaps, we need to get the reachability bitmap of a commit, which is not always precalculated. There is already a class returning such bitmap (BitmapWalker) but it does too much unnecessary work: it calculates ALL reachable objects from a commit (i.e. including trees and blobs), when for reachability the commits are just enough. Introduce BitmapCalculator to get the bitmap of a commit: either because it is precalculated or generating it with a walk only over commits. Change-Id: Ibb6c78affe9eeaf1fa362a06daf4fd2d91c1caea Signed-off-by: Ivan Frade <ifrade@google.com>
| * | | ReachabilityChecker: Default implementation with a RevWalkIvan Frade2019-05-154-0/+413
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is common to check if a certain commit is reachable from some starting points. For example gitiles does it to check if a commit is visible to a user based on its permissions. Offer this functionality in JGit. Split the interface as the next commit will introduce an implementation using bitmap indices. Change-Id: I0933b305c8d734f7a64502910ff4d9ef4fc92ae1 Signed-off-by: Ivan Frade <ifrade@google.com>
* | | Bazel: Simplify names of bouncy castle librariesDavid Ostrovsky2019-05-162-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Name bouncy castle libraries consistently. This also allows to use local jgit tree as dependency in gerrit. Change-Id: Ie0a995a70ecee907d25b3cdda9034a25c0290efe Signed-off-by: David Ostrovsky <david@ostrovsky.org>
* | | Convert to lambda or member referenceCarsten Hammer2019-05-1674-1097/+626
|/ / | | | | | | | | | | | | | | | | | | | | Convert anonymous inner classes to lambda expressions or member references Bug: 545856 CQ: 19537 Change-Id: I621431c178e8b99316314602f7c66c9a36f9ae98 Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Apache MINA sshd client: test reading encrypted ed25519 keysThomas Wolf2019-05-065-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add encrypted ed25519 keys in the tests; sshd 2.2.0 can finally decrypt encrypted new-style OpenSSH key files. (Needs the "unlimited strength" JCE, which is the default since Java 8u161. On older JREs, users should install the policy files available from Oracle.) The "expensive" key added has been generated with OpenSSH's ssh-keygen -t ed25519 -a 256, i.e., with 256 bcrypt KDF rounds instead of the default 16. On my machine it takes about 2sec to decrypt. Bug: 541703 Change-Id: Id3872ca2fd75d8f009cbc932eeb6357d3d1f267c Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | Apache MINA sshd client: adapt to sshd 2.2.0Thomas Wolf2019-05-0636-885/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Update target platforms, maven and bazel builds to use sshd 2.2.0. Adapt internal classes to changed sshd interfaces and remove previous work-arounds for asking repeatedly for key passwords and for loading keys lazily; both are now done by sshd. CQ: 19034 CQ: 19035 Bug: 541425 Change-Id: I85e1df6ebb8a94953a912d9b2b8a7b5bdfbd608a Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Update Orbit to S20190501151401 for 2019-06 M2Matthias Sohn2019-05-0615-65/+47
| | | | | | | | Change-Id: Ice7ba783c1836682d237e7b50bded90ceaa8b564 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Upgrade maven-compiler-plugin to 3.8.1David Pursehouse2019-05-061-1/+1
| | | | | | | | | | Change-Id: I40c9b637f8a877764e48bbfc8255d4e406f62468 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Upgrade surefire plugins version to 2.22.2David Pursehouse2019-05-061-1/+1
| | | | | | | | | | Change-Id: I5ee3eebc54789ffaf87964446591e5d65cca6b93 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Use integer depth in PackWriter's DepthAwareVisitationPolicyMatthias Sohn2019-05-031-4/+4
| | | | | | | | | | | | | | | | - ObjectWalk.getTreeDepth() returns int hence there is no need to use long depths in the lowestDepthVisited map. - Also fix boxing warnings introduced in 0a15cb3a. Change-Id: I6d73b6f41d5d20975d02f376c8588e411eaff0ec Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Upgrade Tycho to 1.4.0 for eclipse buildMichael Keppler2019-04-291-1/+1
| | | | | | | | | | Change-Id: I8893be53a5b45e1f4c177ff002b94c887576f128 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
* | SubmoduleWalk#forPath: Clarify that caller must close returned instanceDavid Pursehouse2019-04-291-2/+4
| | | | | | | | | | Change-Id: I25e7913a78c23c030a8c568975ee1044a9973517 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | ConfigConstants: Fix quoting of section names in javadocsDavid Pursehouse2019-04-291-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace: in the "core section" in the "diff section" in the "merge section" with: in the "core" section in the "diff" section in the "merge" section Change-Id: Ided7bf73e9c8aae4fc4e43d5d5b9f6d7e3066f0a Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Upgrade maven-pmd-plugin to 3.12.0David Pursehouse2019-04-291-1/+1
| | | | | | | | | | Change-Id: I5ae0f0573aae3da3789fecdad494a2dd243e780b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Silence API errors and add missing @since tags caused by 175e6654Matthias Sohn2019-04-292-1/+18
| | | | | | | | Change-Id: If55acad84015f988f1e974bc19c426828b98822b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge branch 'stable-5.3'Matthias Sohn2019-04-2916-95/+323
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.3: Prepare 5.3.2-SNAPSHOT builds JGit v5.3.1.201904271842-r Prepare 5.2.3-SNAPSHOT builds JGit v5.2.2.201904231744-r Revert 4678f4b and provide another solution for bug 467631 Apache MINA sshd: make sendKexInit() work also for re-keying Prepare 5.1.8-SNAPSHOT builds JGit v5.1.7.201904200442-r ObjectUploadListener: Add callback interface Prepare 4.11.9-SNAPSHOT builds JGit v4.11.8.201904181247-r Prepare 4.9.11-SNAPSHOT builds JGit v4.9.10.201904181027-r Prepare 4.7.10-SNAPSHOT builds JGit v4.7.9.201904161809-r Prepare 4.5.8-SNAPSHOT builds JGit v4.5.7.201904151645-r Remember the cause for invalidating a packfile Fix API problem filters Fix pack files scan when filesnapshot isn't modified Change-Id: I8a8671f7767444a77b809bd66a27d776c8332736 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Prepare 5.3.2-SNAPSHOT buildsMatthias Sohn2019-04-2868-425/+425
| | | | | | | | | | Change-Id: Iedd56602acc89783387098c7f92ce0e5bad091e0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v5.3.1.201904271842-rv5.3.1.201904271842-rMatthias Sohn2019-04-2868-89/+89
| | | | | | | | | | Change-Id: If3c323acfd2b6933f7d4fbec480cd4e82224f701 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Merge branch 'stable-5.2' into stable-5.3Matthias Sohn2019-04-2816-99/+327
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.2: Prepare 5.2.3-SNAPSHOT builds JGit v5.2.2.201904231744-r Revert 4678f4b and provide another solution for bug 467631 Apache MINA sshd: make sendKexInit() work also for re-keying Prepare 5.1.8-SNAPSHOT builds JGit v5.1.7.201904200442-r ObjectUploadListener: Add callback interface Prepare 4.11.9-SNAPSHOT builds JGit v4.11.8.201904181247-r Prepare 4.9.11-SNAPSHOT builds JGit v4.9.10.201904181027-r Prepare 4.7.10-SNAPSHOT builds JGit v4.7.9.201904161809-r Prepare 4.5.8-SNAPSHOT builds JGit v4.5.7.201904151645-r Remember the cause for invalidating a packfile Fix API problem filters Fix pack files scan when filesnapshot isn't modified Change-Id: Ie7e572ac7e346f21fe0c387d7448be168a9c127a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>