summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | | | | Merge branch 'stable-4.10' into stable-4.11David Pursehouse2018-08-314-92/+91
| | |\ \ \ \ \ \ | | | | |/ / / / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.10: Bazel: Use hyphen instead of underscore in external repository names Bazel: Format all build files with buildifier 0.15.0 ChangeIdUtilTest: Remove unused notestCommitDashV Change-Id: I500dd4e63302abb19ad669988b3a427cef8ef3d4 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | * | | | | Merge branch 'stable-4.9' into stable-4.10David Pursehouse2018-08-314-92/+91
| | | |\ \ \ \ \ | | | | | |/ / / | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: Bazel: Use hyphen instead of underscore in external repository names Bazel: Format all build files with buildifier 0.15.0 ChangeIdUtilTest: Remove unused notestCommitDashV Change-Id: I37e936de0c06d4b9f17724ac4f1feb83f6c15ae3 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | * | | | Merge branch 'stable-4.8' into stable-4.9David Pursehouse2018-08-314-92/+91
| | | | |\ \ \ \ | | | | | | |/ / | | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.8: Bazel: Use hyphen instead of underscore in external repository names Bazel: Format all build files with buildifier 0.15.0 ChangeIdUtilTest: Remove unused notestCommitDashV Change-Id: I17436237cd66ca1c2800ad5ab0142f4a2bc07328 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | | * | | Merge branch 'stable-4.7' into stable-4.8David Pursehouse2018-08-316-107/+89
| | | | | |\ \ \ | | | | | | | |/ | | | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.7: Bazel: Use hyphen instead of underscore in external repository names Bazel: Format all build files with buildifier 0.15.0 ChangeIdUtilTest: Remove unused notestCommitDashV Change-Id: I414ade902dc38b696c566dd604000e3d289f3973 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | | | * | Bazel: Use hyphen instead of underscore in external repository namesDavid Pursehouse2018-08-302-30/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent Bazel versions support the hyphen character in external repository names. On the Gerrit project, the repository names were harmonized to consistently use hyphen. As a side effect, it is no longer possible to build jgit from source in the gerrit tree, due to the different repository names. Rename the dependencies to use hyphens, consistent with gerrit. Change-Id: Ideebd858ddd3f0e6f765643001642dfb6c12441f Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | | | * | Bazel: Format all build files with buildifier 0.15.0David Pursehouse2018-08-304-62/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | | | | | * Use right variable in error message about depthIvan Frade2018-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When this exception is thrown, the `depth` member variable isn't set yet, resulting in a confusing error message: "Invalid depth: 0". Change-Id: I8a2bd5e1d9bec00acb0b8857bbf6821e95bf1369 Signed-off-by: Ivan Frade <ifrade@google.com>
| | | | | | | * Merge "UploadPack: avoid conflating shallow commit lists in protocol v2"Jonathan Nieder2018-08-302-7/+50
| | | | | | | |\
| | | | | | | | * UploadPack: avoid conflating shallow commit lists in protocol v2Ivan Frade2018-08-302-7/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment there are two copies of the client shallow commit list: one in the request and another in the clientShallowCommits member of the class. The verifyShallowCommit function was removing missing object ids from the member but not the request list, and code afterwards was using the request's version. In practice, this didn't cause trouble because these shallow commits are used as endpoint for a walk, and missing ids are just never reached. Change-Id: I70a8f1fd46de135da09f16e5d954693c8438ffcb Signed-off-by: Ivan Frade <ifrade@google.com>
| | | | | | | * | Bazel: Use hyphen instead of underscore in external repository namesDavid Pursehouse2018-08-302-30/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent Bazel versions support the hyphen character in external repository names. On the Gerrit project, the repository names were harmonized to consistently use hyphen. As a side effect, it is no longer possible to build jgit from source in the gerrit tree, due to the different repository names. Rename the dependencies to use hyphens, consistent with gerrit. Change-Id: Ideebd858ddd3f0e6f765643001642dfb6c12441f Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | | | | * | Format BUILD files with buildifier 0.15.0David Pursehouse2018-08-301-1/+1
| | | | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I6200b0040d24da86968c688f45a2056343e182be Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | | | | * Merge branch 'stable-5.1'Matthias Sohn2018-08-292-2/+2
| | | | | | | |\ | |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.1: Adjust severity of missing execution environment for LFS Prepare 5.1.0-SNAPSHOT builds JGit v5.1.0.201808281540-m3 Change-Id: Iebe26d872b92a347eea479a136a4a2bac726b0bb Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | Adjust severity of missing execution environment for LFSMarkus Duft2018-08-292-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All other JGit bundles use severity warning for missing execution environment definition. Use the same configuration for LFS bundles. Bug: 488123 Change-Id: I575d6d61418f5c4e39303fb8a9cd69e6539f6b5e Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
* | | | | | | | Prepare 5.1.0-SNAPSHOT buildsMatthias Sohn2018-08-2956-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If57fcce14f5ba3ef2a2602515e2f89b8f22a742b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | JGit v5.1.0.201808281540-m3v5.1.0.201808281540-m3Matthias Sohn2018-08-2856-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie86c46a828b55a2235056b9a5bc2c6c450b95ed0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | * Upgrade maven-compiler-plugin to 3.8.0David Pursehouse2018-08-291-2/+3
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I545095f9ee7481c73765d029f9a32edf01625893 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | Update Orbit to S20180820175350 for 2018-09 M3Matthias Sohn2018-08-2811-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ifecbe9a7f36e65a191f007f0216633e9038ebff9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | Add ls-files CLI commandMatthias Sohn2018-08-284-0/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the basic functionality and support the option --help (-h). Change-Id: Ibcdf0c958d0f93b7415d4e591b1455ccba5d95f7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | Merge branch 'stable-5.0'David Pursehouse2018-08-272-1/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.0: Fix NoSuchFileException in GC.deleteTempPacksIdx() Fix NoSuchFileException during directory cleanup in RefDirectory Change-Id: I35bd4bcbeac2430f674ccb6b947ac3776cec8a82 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * | | | | | Fix NoSuchFileException in GC.deleteTempPacksIdx()Matthias Sohn2018-08-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This exception is thrown in GC.deleteTempPacksIdx() if the repository has no packs. Bug: 538286 Change-Id: Ieb482be751226baf0843068a0f847e0cdc6e0cb6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | | Fix NoSuchFileException during directory cleanup in RefDirectoryMatthias Sohn2018-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 538285 Change-Id: Iab5c381a412cb2c2176af55189668c267ed29fbc Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | Merge "Externalize warning message in RefDirectory.delete()"Matthias Sohn2018-08-273-1/+4
|\ \ \ \ \ \ \
| * | | | | | | Externalize warning message in RefDirectory.delete()Matthias Sohn2018-08-273-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Icec16c01853a3f5ea016d454b3d48624498efcce Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | Merge "Cleanup existing tests"Christian Halstrick2018-08-271-15/+13
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | |
| * | | | | | | Cleanup existing testsRené Scheibe2018-08-241-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Renamed and restructured tests for improved clarity. Bug: 479266 Change-Id: Ic9d05ddf722bddd148fa9d9c19248dd53d97f1e4 Signed-off-by: René Scheibe <rene.scheibe@gmail.com>
* | | | | | | | HttpClientConnectionTest: Throw UnsupportedOperationException for unused methodsDavid Pursehouse2018-08-271-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HttpResponseMock class is only used in a single test to assert on the expected headers. All of its overridden methods are empty, and this results in warnings in Eclipse: 'Empty block should be documented' Rather than adding "// Not used" comments, change all of the methods' implementations to throw UnsupportedOperationException. This not only gets rid of the warnings, but also makes it explicit that we don't intend any of them to actually be called. Change-Id: I8fe06b155e0809bb3507e4e28b00fcc4f9333b0b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | HttpClientConnectionTest: Reformat with the Eclipse styleDavid Pursehouse2018-08-271-132/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1066dea0bbb4573aabaf417365fb46772f0f4d0e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | HttpClientConnectionTest: Add missing license headerDavid Pursehouse2018-08-271-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I9e4bd2bfe16f4824eb8ed7ccfab332646b3233b1 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | Merge branch 'stable-5.0'Matthias Sohn2018-08-2515-64/+331
|\ \ \ \ \ \ \ \ | | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.0: Silence API warning for new ObjectIdSerializer introduced in 4.11.1 Ignore API warnings Fix photon target platform to use photon version of org.eclipse.osgi Update Photon orbit repository to R20180606145124 Suppress warning for trying to delete non-empty directory Fix fetching with duplicate ref updates Fetch(Process): should tolerate duplicate refspecs FetchCommandTest: test add/update/delete fetch Change-Id: I9e7fa37b100a7ea3cbe4104802d36c6f38df9e08 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | | | Merge branch 'stable-4.11' into stable-5.0Matthias Sohn2018-08-2513-77/+202
| |\ \ \ \ \ \ \ | | | |/ / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.11: Silence API warning for new ObjectIdSerializer introduced in 4.11.1 Ignore API warnings Fix photon target platform to use photon version of org.eclipse.osgi Update Photon orbit repository to R20180606145124 Suppress warning for trying to delete non-empty directory Fix fetching with duplicate ref updates Fetch(Process): should tolerate duplicate refspecs FetchCommandTest: test add/update/delete fetch Change-Id: I2497f99b7d0686a0e0f773c39c8725e813ce9d4a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | | | Silence API warning for new ObjectIdSerializer introduced in 4.11.1Matthias Sohn2018-08-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic271dae300f7554b7e13bb1f44006e5b38c00011 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | | | Merge branch 'stable-4.10' into stable-4.11Matthias Sohn2018-08-2512-52/+236
| | |\ \ \ \ \ \ | | | | |/ / / / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.10: Ignore API warnings Fix photon target platform to use photon version of org.eclipse.osgi Update Photon orbit repository to R20180606145124 Suppress warning for trying to delete non-empty directory Fix fetching with duplicate ref updates Fetch(Process): should tolerate duplicate refspecs FetchCommandTest: test add/update/delete fetch Change-Id: I47671108574fcd10fe016a58e38c038af54a6748 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * | | | | Merge branch 'stable-4.9' into stable-4.10Matthias Sohn2018-08-246-25/+209
| | | |\ \ \ \ \ | | | | | |/ / / | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: Ignore API warnings Fix photon target platform to use photon version of org.eclipse.osgi Update Photon orbit repository to R20180606145124 Suppress warning for trying to delete non-empty directory Fix fetching with duplicate ref updates Fetch(Process): should tolerate duplicate refspecs FetchCommandTest: test add/update/delete fetch Change-Id: I2a83c059b7014c2a9e6267c963422c7785b23f17 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * | | | Ignore API warningsMatthias Sohn2018-08-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following commits introduced in stable-4.5 and stable-4.9 introduced some minor API additions in service releases. f7ceeaa2 FileRepository: Add pack-based inserter implementation 085d1f95 Make PackInserter public 10e65cb4 Fix LockFile semantics when running on NFS Change-Id: I4afed7e0395cf93d828e671080e3ec9ddf20987d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * | | | Fix photon target platform to use photon version of org.eclipse.osgiMatthias Sohn2018-08-242-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I81cb499a5092eed6569f6fdf612ecab3f5d9bd5e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * | | | Update Photon orbit repository to R20180606145124Matthias Sohn2018-08-233-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The S-repository doesn't exist anymore and we should have updated to the final Photon orbit repository already. Change-Id: I6d1757833be4abd3643677d6e7814363533e88b2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * | | | Suppress warning for trying to delete non-empty directoryThomas Wolf2018-08-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is actually a fairly common occurrence; deleting the parent directories can work only if the file deleted was the last one in the directory. Bug: 537872 Change-Id: I86d1d45e1e2631332025ff24af8dfd46c9725711 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
| | | | * | | | Fix fetching with duplicate ref updatesThomas Wolf2018-08-222-5/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If packed refs are used, duplicate updates result in an exception because JGit tries to lock the same lock file twice. With non-atomic ref updates, this used to work, since the same ref would simply be locked and updated twice in succession. Let's be more lenient in this case and remove duplicates before trying to do the ref updates. Silently skip duplicate updates for the same ref, if they both would update the ref to the same object ID. (If they don't, behavior is undefined anyway, and we still throw an exception.) Add a test that results in a duplicate ref update for a tag. Bug: 529400 Change-Id: Ide97f20b219646ac24c22e28de0c194a29cb62a5 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
| | | | * | | | Fetch(Process): should tolerate duplicate refspecsMarc Strapetz2018-08-222-1/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 529314 Change-Id: I91eaeda8a988d4786908fba6de00478cfc47a2a2 Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com> Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
| | | | * | | | FetchCommandTest: test add/update/delete fetchMarc Strapetz2018-08-221-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2442394fb7eae5b3715779555477dd27b274ee83 Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com> Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | | | | pgm: remove explicit version of log4j and slf4j in pom.xmlDavid Pursehouse2018-08-251-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The version is inherited from the master pom.xml so does not need to be explicitly specified, unless the intent is to override the version. This is not the case, though, since the versions are specified with the properties defined in the master pom.xml. Despite the fact that using the properties results in the versions effectively not being overridden, Eclipse still warns about it, seemingly due the fact that a value is given in the version field. Change-Id: I163ede6689b9e2e7dd7b21f22b4068d638fa97aa Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | Don't override managed version of httpclient for LFS server testsDavid Pursehouse2018-08-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The version is 4.5.5 in the master pom.xml but overridden with 4.3.6 in the LFS server tests pom.xml. Remove the override so that the same version is used everywhere. Change-Id: Ibccc93a0c2a9c05db23cf131585184d67611b579 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | HttpClientTests: Open OutputStream in try-with-resourceDavid Pursehouse2018-08-251-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib690b0af6d562765f43ad54d3855200a17eaa90b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | HttpClientTests: Use assertEquals to assert about response codeDavid Pursehouse2018-08-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current usage of assertThat causes a warning in Eclipse: "The expression of type int is boxed into Integer". Replace it with assertEquals which does not cause this warning, and is consistent with how such assertions are done in other tests. Change-Id: Id3de3548353bf6be069b6ede89c605d094b6d3f4 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | Add fetch support to ProtocolV2HookIvan Frade2018-08-243-39/+405
| |_|_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it symmetrical with ls-refs operation and gives the instantiator of UploadPack the chance to run some code after parsing the protocol and before any actual work for the fetch starts. Request and Builder methods keep the naming in the original code to make this change just about request encapsulation and hook invocation. They are package-private for now to allow further improvements. Change-Id: I5ad585c914d3a5f23b11c8251803faa224beffb4 Signed-off-by: Ivan Frade <ifrade@google.com>
* | | | | | | UploadPack: shallowExcludeRefs doesn't need to be nullableIvan Frade2018-08-231-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code can check size instead of null, and that makes the initialization trivial. Change-Id: Icbe655816429a7a680926b0e871d96f3b2f1f7ba Signed-off-by: Ivan Frade <ifrade@google.com>
* | | | | | | RefDirectory: Add missing $NON-NLS suppressionDavid Pursehouse2018-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I6afb4f86c3a8a06e5ea3128bf1b9b20c46ca158c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | refactor: simplify collection.toArray()Michael Keppler2018-08-2325-37/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On recent VMs, collection.toArray(new T[0]) is faster than collection.toArray(new T[collection.size()]). Since it is also more readable, it should now be the preferred way of collection to array conversion. https://shipilev.net/blog/2016/arrays-wisdom-ancients/ Change-Id: I80388532fb4b2b0663ee1fe8baa94f5df55c8442 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
* | | | | | | UploadPack: Add missing $NON-NLS suppressionsDavid Pursehouse2018-08-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ica2cc0ed23a7667bcb8d2006fd0a6ba6bddfee9a Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>