summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
Commit message (Collapse)AuthorAgeFilesLines
* JGit v4.7.8.201903121755-rv4.7.8.201903121755-rMatthias Sohn2019-03-122-2/+2
| | | | | Change-Id: Ia6dbde615671ed09789326aacad1655e7a7a59ad Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.7.8-SNAPSHOT buildsMatthias Sohn2018-12-242-44/+44
| | | | Change-Id: Ic4ab4aae6d87392d1a5a8bbda06384b7a5b64182 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v4.7.7.201812240805-rv4.7.7.201812240805-rMatthias Sohn2018-12-242-2/+2
| | | | | Change-Id: I57b6001b1fbd6042299ccd4dd7d70765a46ea10b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.7.7-SNAPSHOT buildsMatthias Sohn2018-10-192-44/+44
| | | | | Change-Id: I131e40cbbf32bc75d2ed24ca31ba3613a3bbca25 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v4.7.6.201810191618-rv4.7.6.201810191618-rMatthias Sohn2018-10-192-2/+2
| | | | | Change-Id: Iaee27d5e2de016240f1a0940653fef82c6044a1d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.7.6-SNAPSHOT buildsMatthias Sohn2018-10-062-44/+44
| | | | | Change-Id: I99b59116999742d8d6cdba26287ea7c6eba11a30 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v4.7.5.201810051826-rv4.7.5.201810051826-rMatthias Sohn2018-10-062-2/+2
| | | | | Change-Id: I60c7a2eff3dab5083f71df0d9465a4e94b5e2513 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* BaseReceivePack: Validate incoming .gitmodules filesIvan Frade2018-10-051-0/+65
| | | | | | | | | | | | The main concern are submodule urls starting with '-' that could pass as options to an unguarded tool. Pass through the parser the ids of blobs identified as .gitmodules files in the ObjectChecker. Load the blobs and parse/validate them in SubmoduleValidator. Change-Id: Ia0cc32ce020d288f995bf7bc68041fda36be1963 Signed-off-by: Ivan Frade <ifrade@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* ObjectChecker: Report .gitmodules files found in the packIvan Frade2018-10-051-2/+117
| | | | | | | | | | | | | | | | | | | | | In order to validate .gitmodules files, we first need to find them in the incoming pack. Do it in the ObjectChecker stage. Check in the tree objects if they point to a .gitmodules file and report the tree id and the .gitmodules blob id. This can be used later to check if the file is in the root of the project and if the contents are good. While we're here, make isMacHFSGit more accurate by detecting variants of filenames that vary in case. [jn: tweaked NTFS and HFS+ checking; added more tests] Change-Id: I70802e7d2c1374116149de4f89836b9498f39582 Signed-off-by: Ivan Frade <ifrade@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* SubmoduleAddCommand: Reject submodule URIs that look like cli optionsIvan Frade2018-10-051-1/+32
| | | | | | | | | | | | | | | | In C git versions before 2.19.1, the submodule is fetched by running "git clone <uri> <path>". A URI starting with "-" would be interpreted as an option, causing security problems. See CVE-2018-17456. Refuse to add submodules with URIs, names or paths starting with "-", that could be confused with command line arguments. [jn: backported to JGit 4.7.y, bringing portions of Masaya Suzuki's dotdot check code in v5.1.0.201808281540-m3~57 (Add API to specify the submodule name, 2018-07-12) along for the ride] Change-Id: I2607c3acc480b75ab2b13386fe2cac435839f017 Signed-off-by: Ivan Frade <ifrade@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.7.5-SNAPSHOT buildsMatthias Sohn2018-09-182-44/+44
| | | | | Change-Id: Ifce4311fe9429d751cec5b326b540d6233762153 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v4.7.4.201809180905-rv4.7.4.201809180905-rMatthias Sohn2018-09-182-2/+2
| | | | | Change-Id: Iceee69df5fd593bece4532d5781e3771f5761ef8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.7.4-SNAPSHOT buildsMatthias Sohn2018-09-092-44/+44
| | | | | Change-Id: Ie4d17e1604270946606e75145012c5b7fa1283eb Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v4.7.3.201809090215-rv4.7.3.201809090215-rMatthias Sohn2018-09-092-2/+2
| | | | | Change-Id: I1ded7a2b61235509c5a6ba95e7329e288bbfddb1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Use constant for ".lock"Matthias Sohn2018-09-071-4/+5
| | | | | | (cherry picked from commit 5f27032fb85694a093f827581216d4ffb99db68b) Change-Id: I6bc0e9a910b110418a82d8e574fb2aecc3a31d6a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Bazel: Format all build files with buildifier 0.15.0David Pursehouse2018-08-302-45/+45
| | | | | Change-Id: I8343b723da6e40d5ae7fc45c84f64c31276bd5dc Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* ChangeIdUtilTest: Remove unused notestCommitDashVDavid Pursehouse2018-08-301-17/+0
| | | | | | | | | | | | | | | | This test was never being run. Since it was introduced it was named "notest.." which meant it didn't run with JUnit3, and since it is not annotated @Test it also doesn't run with JUnit4. When compiling with Bazel 0.6.0, error-prone raises an error that the public method is not annotated with @Ignore or @Test. Given that the test has never been run anyway, we can just remove it. Bug: 525415 Change-Id: Ie9a54f89fe42e0c201f547ff54ff1d419ce37864 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Prepare 4.7.3-SNAPSHOT buildsMatthias Sohn2018-07-272-44/+44
| | | | | Change-Id: I5c437f45d5bc469e3c32bef1180c127d96d24d23 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v4.7.2.201807261330-rv4.7.2.201807261330-rMatthias Sohn2018-07-262-2/+2
| | | | | Change-Id: I0d8c7ca756e6236e315c91da000fe8103ce83d05 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Delete all loose refs empty directoriesLuca Milanesio2018-07-261-10/+24
| | | | | | | | | | Remove completely the empty directories under refs/<namespace> including the first level partition of the changes, when they are completely empty. Bug: 536777 Change-Id: I88304d34cc42435919c2d1480258684d993dfdca Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* GC: Remove empty references foldersHector Caballero2018-07-101-0/+118
| | | | | | | | | | | | | | | | | After packaging references, the folders containing these references are not deleted. In a busy repository, this causes operations to slow down as traversing the references tree becomes longer. Delete empty reference folders after the loose references have been packed. To avoid deleting a folder that was just created by another concurrent operation, only delete folders that were not modified in the last 30 seconds. Signed-off-by: Hector Oswaldo Caballero <hector.caballero@ericsson.com> Change-Id: Ie79447d6121271cf5e25171be377ea396c7028e0 Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Merge branch 'stable-4.6' into stable-4.7David Pursehouse2018-06-201-0/+3
|\ | | | | | | | | | | | | | | * stable-4.6: Temporarily @Ignore flaky CommitCommandTest methods Change-Id: Idc653c22a9af2013a4c481bb19ca8d059f5c34d0 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * Merge branch 'stable-4.5' into stable-4.6David Pursehouse2018-06-191-0/+3
| |\ | | | | | | | | | | | | | | | | | | | | | * stable-4.5: Temporarily @Ignore flaky CommitCommandTest methods Change-Id: I2a0e0b63a06f442f5a088d4bc8bb08eaf02ce952 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | * Temporarily @Ignore flaky CommitCommandTest methodsDave Borowitz2018-06-191-0/+3
| | | | | | | | | | | | | | | | | | Change-Id: Ia2c42d014323bd29b85bf76f1a20c83f612406d7 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> (cherry picked from commit e93b0026ced10c956e76daed038f2560a33b5baf)
| | * Prepare 4.5.5-SNAPSHOT buildsMatthias Sohn2017-11-222-42/+42
| | | | | | | | | | | | | | | Change-Id: I71f946f2875716670a2d74c21a8ab38a1f53a25c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * JGit v4.5.4.201711221230-rv4.5.4.201711221230-rMatthias Sohn2017-11-222-2/+2
| | | | | | | | | | | | | | | Change-Id: Ia1079da239c5b3fde1ba8d2acc4e465a46297b4d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Prepare 4.5.4-SNAPSHOT buildsMatthias Sohn2017-08-262-42/+42
| | | | | | | | | | | | | | | Change-Id: Id8b902bf2bf590b41f2e246c5ecf1592e1c411f2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * JGit v4.5.3.201708160445-rv4.5.3.201708160445-rMatthias Sohn2017-08-162-2/+2
| | | | | | | | | | | | | | | Change-Id: I2d57144976e3683e180d3a42edc6c3bf2905e87c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Merge branch 'stable-4.6' into stable-4.7Matthias Sohn2017-08-141-0/+103
|\| | | | | | | | | | | | | | | | | | | | | | | * stable-4.6: Update Oxygen Orbit p2 repository to R20170516192513 Fix exception handling for opening bitmap index files Change-Id: I669fe48ce0034f9ea1977d38ee39099497422c1c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Merge branch 'stable-4.5' into stable-4.6Matthias Sohn2017-08-141-0/+103
| |\| | | | | | | | | | | | | | | | | | | | | | * stable-4.5: Fix exception handling for opening bitmap index files Change-Id: Ifb511238e3e98b1bc9f79a990807b940a17ebaa6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Fix exception handling for opening bitmap index filesChristian Halstrick2017-08-141-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating a new PackFile instance it is specified whether this pack has an associated bitmap index file or not. This information is cached and the public method getBitmapIndex() will always assume a bitmap index file must exist if the cached data tells so. But it may happen that the packfiles are repacked during a gc in a different process causing the packfile, bitmap-index and index file to be deleted. Since JGit still has an open FileHandle on the packfile this file is not really deleted and can still be accessed. But index and bitmap index file are deleted. Fix getBitmapIndex() to invalidate the cached packfile instance if such a situation occurs. This problem showed up when a gerrit server was serving repositories which where garbage collected with native git regularly. Fetch and clone commands for certain repositories failed permanently after a native git gc had deleted old bitmap index files. Change-Id: I8e620bec74dd3f310ba42024f9a657062f868f0e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Prepare 4.5.3-SNAPSHOT buildsMatthias Sohn2017-04-082-42/+42
| | | | | | | | | | | | | | | Change-Id: I69681b7a5687ca76bd0dd5d3e7ce2cff841d0e32 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * JGit v4.5.2.201704071617-rv4.5.2.201704071617-rMatthias Sohn2017-04-072-2/+2
| | | | | | | | | | | | | | | Change-Id: I66402643d7c84c90bf5cefed4d2ec3aa68c94cfb Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Prepare 4.5.2-SNAPSHOT buildsMatthias Sohn2017-03-252-42/+42
| | | | | | | | | | | | | | | Change-Id: I8485de1f3f63dc9ec445b8fb08093ca144aedc59 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * JGit v4.5.1.201703201650-rv4.5.1.201703201650-rMatthias Sohn2017-03-202-2/+2
| | | | | | | | | | | | | | | Change-Id: I88de7c9f52abbc4921a82208ed74d22aa19fb3cd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Prepare 4.6.2-SNAPSHOT buildsMatthias Sohn2017-03-072-43/+43
| | | | | | | | | | | | | | | Change-Id: I8835f79145e6a989787d47322c3d8cb9baf0624a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | JGit v4.6.1.201703071140-rv4.6.1.201703071140-rMatthias Sohn2017-03-072-2/+2
| | | | | | | | | | | | | | | Change-Id: I842dc95313e5b47b0b7ec983c4a0a91915ed4183 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Prepare 4.7.2-SNAPSHOT buildsMatthias Sohn2017-06-082-44/+44
| | | | | | | | | | | | | | | Change-Id: I7c127bd402cd84c68d8f33a32c6aad093a2264c8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | JGit v4.7.1.201706071930-rv4.7.1.201706071930-rMatthias Sohn2017-06-082-2/+2
| | | | | | | | | | | | | | | Change-Id: I28cd8fbe995d76c8a00e7db6ddf826e983d89043 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Cleanup and test trailing slash handling in ManifestParserHan-Wen Nienhuys2017-04-112-0/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a workaround for https://bugs.openjdk.java.net/browse/JDK-4666701. Change-Id: Idd04657e8d95a841d72230f8881b6b899daadbc2 Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | ManifestParser: Throw exception if remote does not have fetch attributeHan-Wen Nienhuys2017-04-101-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the repo manifest documentation [1] the fetch attribute is marked as "#REQUIRED". If the fetch attribute is not specified, this would previously result in NullPointerException. Throw a SAXException instead. [1] https://gerrit.googlesource.com/git-repo/+/master/docs/manifest-format.txt Change-Id: Ib8ed8cee6074fe6bf8f9ac6fc7a1664a547d2d49 Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | PushConnectionTest: Increase maxCommandBytes againDavid Pursehouse2017-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | It was already increased in 61a943e, but that was still not enough to take into account the length of snapshot versions. Change-Id: Ib54cec97e97042fe274b87a3a1afa9bb06c8bf19 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | Prepare 4.7.1-SNAPSHOTMatthias Sohn2017-04-062-44/+44
| | | | | | | | | | | | | | | Change-Id: I16a45035258276217446bccc0ad1b0991383aa0c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | JGit v4.7.0.201704051617-rv4.7.0.201704051617-rMatthias Sohn2017-04-052-2/+2
| | | | | | | | | | | | | | | Change-Id: Ic2bd6aca0b7a7e0597ffc1f7cf647b49878f9950 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | PushConnectionTest#limitCommandBytes: Increase maxCommandBytesDavid Pursehouse2017-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A higher limit is required to account for proper JGit version number being sent in the UserAgent. The version string "4.7.0.201704031717-r" is 20 characters, however the strings used during development are shorter: - When running from mvn, "4.7.0.qualifier" is used; 15 characters - When running in Eclipse, "unknown" is used; 7 characters Change-Id: I9aca2f71389a42fedce305e9078db016869c3d1a Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | PullCommand: Add support for recursing into submodulesDavid Pursehouse2017-03-241-37/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new API method to set the recurse mode, and pass the mode into the fetch command. Extend the existing FetchCommandRecurseSubmodulesTest to also perform the same tests for fetch. Rename the test class accordingly. Change-Id: I12553af47774b4778f7011e1018bd575a7909bd0 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | bazel: Consume hamcrest through transitive dependencyDavid Ostrovsky2017-03-231-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | In I3ab958ce8 explicit dependency in lib/BUILD were defined and most of the bazel build implementation was switched to using it. Switch test.bzl test implementation to using explicit dependencies as well. Change-Id: I4413d1a45addeeb2a980d07669fa034c2eebb3a4 Signed-off-by: David Ostrovsky <david@ostrovsky.org>
* | | Remove Buck buildDavid Pursehouse2017-03-221-95/+0
| | | | | | | | | | | | | | | | | | Buck will be replaced with Bazel Change-Id: I3cf07d7aaaa2a58bac34e16c50af5416693254ac Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Add remaining parts of the bazel buildDavid Ostrovsky2017-03-212-0/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add bazel build for ui and junit.http, and the test packages. A number of different test labels are supported: api attributes dfs diff http lfs lfs-server nls notes pack patch pgm reftree revplot revwalk storage submodule symlinks transport treewalk util To run all tests: bazel test //... To run specific tests, using labels: bazel test --test_tag_filters=api,dfs,revplot,treewalk //... Change-Id: Ic41b05a79d855212e67b1b4707e9c6b4dc9ea70d Signed-off-by: David Ostrovsky <david@ostrovsky.org> Signed-off-by: Jonathan Nieder <jrn@google.com>
* | | Delegate crypto algorithm creation to InsecureCipherFactoryDavid Ostrovsky2017-03-211-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a preparation change to Bazel build implementation. Error Prone rejects the code with variable crypto algorithm as insecure see: [1]. [1] http://errorprone.info/bugpattern/InsecureCryptoUsage Change-Id: I92db70a7da454bc364597a995e8be5dccc2d6427 Signed-off-by: David Ostrovsky <david@ostrovsky.org>