summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Prepare 5.2.0-SNAPSHOT buildsMatthias Sohn2018-09-0656-357/+357
| | | | | Change-Id: If8e8ca20e745901a5e0239c16cb4acc7934b4ec8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge "Merge branch 'stable-5.1'"David Pursehouse2018-09-060-0/+0
|\
| * Merge branch 'stable-5.1'Matthias Sohn2018-09-060-0/+0
| |\ | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.1: Prepare 5.1.0-SNAPSHOT builds JGit v5.1.0.201809051400-rc1 Change-Id: Ic34523c4ac725d2af20c79c4f856060808090699 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Prepare 5.1.0-SNAPSHOT buildsMatthias Sohn2018-09-0556-59/+59
| | | | | | | | | | | | | | | Change-Id: I3d06c5237edae54b09f465f415f5a308b5e7ceff Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * JGit v5.1.0.201809051400-rc1v5.1.0.201809051400-rc1Matthias Sohn2018-09-0556-59/+59
| | | | | | | | | | | | | | | Change-Id: I0b53f95ee51d94da8b029c9bb10eb854ff9dd4f6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Merge branch 'master' into stable-5.1Matthias Sohn2018-09-05127-696/+1350
| | |\ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: UploadPackTest: Avoid unnecessarily boxing int into Integer Parse signature of GPG-signed commits Deprecate Constants.CHARSET in favor of StandardCharsets.UTF_8 Simplify file creation in ResetCommandTest Specify charset when constructing InputStreamReader Update Orbit to S20180829155938 for 2018-09 RC1 Replace useminimalnegotation flag with maxhaves flag Extract protocol v2 fetch request parsing to its own class FetchV2Request: Rename shallowSince to deepenSince FetchV2Request: Correct typo in parameter name FetchV2Request round up (doneReceived, renamings) Use right variable in error message about depth UploadPack: avoid conflating shallow commit lists in protocol v2 Bazel: Use hyphen instead of underscore in external repository names Format BUILD files with buildifier 0.15.0 Upgrade maven-compiler-plugin to 3.8.0 Change-Id: Ibc6feb828e4ff20a3158e6b75dcfce7617e00b0e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* / | Extend ResetCommandTestRené Scheibe2018-09-051-2/+8
|/ / | | | | | | | | | | | | | | Also check that reflog is enabled by default. Also check that a file in a folder is reset correctly. Change-Id: I4bc6649928ce10d7b558901e465e8032b083ade0 Signed-off-by: René Scheibe <rene.scheibe@gmail.com>
* | UploadPackTest: Avoid unnecessarily boxing int into IntegerDavid Pursehouse2018-09-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The statement: assertThat(recvStream.available(), is(0)); results in a warning from Eclipse: The expression of type int is boxed into Integer because recvStream.available() returns int, but the hamcrest is() method takes an Integer. Replace it with the equivalent JUnit assertion. Also remove the suppression of another similar warning and fix that in the same way. Change-Id: I6f18b304a540bcd0a10aec7d3abc7dc6f047fe80 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Parse signature of GPG-signed commitsDavid Turner2018-09-044-0/+160
| | | | | | | | | | | | | | | | | | | | In order to support GPG-signed commits, add some methods which will allow GPG signatures to be parsed out of RevCommit objects. Later, we can add code to verify the signatures. Change-Id: Ifcf6b3ac79115c15d3ec4b4eaed07315534d09ac Signed-off-by: David Turner <dturner@twosigma.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Deprecate Constants.CHARSET in favor of StandardCharsets.UTF_8David Pursehouse2018-09-04105-397/+442
| | | | | | | | | | Change-Id: I3b748620f067582afef20f144feebe40d0332be2 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Simplify file creation in ResetCommandTestRené Scheibe2018-09-031-38/+17
| | | | | | | | | | | | | | Use existing test utility methods instead of nested PrintWriter usage. Change-Id: I324852c7971ae644fa499f377a31d1cf265c7fd9 Signed-off-by: René Scheibe <rene.scheibe@gmail.com>
* | Specify charset when constructing InputStreamReaderDavid Pursehouse2018-09-025-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | ErrorProne warns [1] about implicit use of the platform default charset, which can result in differing behaviour between JVM executions or incorrect behavior if the encoding of the data source doesn't match expectations. [1] http://errorprone.info/bugpattern/DefaultCharset Change-Id: I0fd489d352170339c3867355cd24324dfdbd4b59 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Update Orbit to S20180829155938 for 2018-09 RC1Matthias Sohn2018-09-0111-17/+17
| | | | | | | | Change-Id: I48d5a2e06e2833c9745cb71c53600da3ed5f8501 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge "Replace useminimalnegotation flag with maxhaves flag"Jonathan Nieder2018-08-312-60/+15
|\ \
| * | Replace useminimalnegotation flag with maxhaves flagMinh Thai2018-08-312-60/+15
| | | | | | | | | | | | | | | | | | | | | Client will stop sending haves when the number of haves sent reaches maxhaves. Change-Id: I1e5b1525be4c67f20a81ca24a2770c20eb5c1271 Signed-off-by: Minh Thai <mthai@google.com>
* | | Extract protocol v2 fetch request parsing to its own classIvan Frade2018-08-313-137/+585
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parsing code for protocol v2 fetch doesn't have any dependency on the rest of UploadPack. Move it to its own class. This makes testing easier (no need to instantiate the full UploadPack), simplifies the code in UploadPack and increases modularity. At the moment, the parser needs to know about the reference database to validate incoming references. This dependency could be easily removed moving the validation later in the flow, after the parsing, where other validations are already happening. Postponing that to keep this patch about moving unmodified code around. Change-Id: I7ad29a6b99caa7c12c06f5a7f30ab6a5f6e44dc7 Signed-off-by: Ivan Frade <ifrade@google.com>
* | | FetchV2Request: Rename shallowSince to deepenSinceJonathan Nieder2018-08-312-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fetch parameter is called deepen-since in the protocol. Call it the same thing in the request object to make the code easier to reason about. This doesn't touch UploadPack#shallowSince, which is likely to be eliminated altogether in a later patch anyway. Change-Id: I8ef34bc7ad12fae3a9057ae951367cc024e1a1cb Suggested-by: Ivan Frade <ifrade@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com>
* | | FetchV2Request: Correct typo in parameter nameJonathan Nieder2018-08-311-2/+2
|/ / | | | | | | | | | | | | There is an extra 'd' in deependNotRefs. Noticed during code review. Change-Id: I93d8d7951fe5c351b62e23bdf5bad0ebd631017d Signed-off-by: Jonathan Nieder <jrn@google.com>
* | Merge "FetchV2Request round up (doneReceived, renamings)"Jonathan Nieder2018-08-312-26/+46
|\ \
| * | FetchV2Request round up (doneReceived, renamings)Ivan Frade2018-08-312-26/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make "doneReceived" a member of the fetch request. It indicates if the "done" line has been received (so it makes sense there) and makes all the code after the parsing depend only on the request. Rename "shallowExcludeRefs" to "deepenNot". Those refs come in "deepen-not" lines in the protocol, and this name makes clearer the intention. Change-Id: I7bec65de04930277266491d278de7c3af7d8cbe6 Signed-off-by: Ivan Frade <ifrade@google.com>
* | | Merge branch 'stable-5.1'David Pursehouse2018-08-312-69/+68
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | * stable-5.1: 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: Ie9d77a7716591246b87fb59ac85214417fe8309d Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * Merge branch 'stable-5.0' into stable-5.1David Pursehouse2018-08-315-100/+99
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.0: 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: I7c2fc7d694d7d891cac96cb805c89c8bdf7c5cbf Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | * Merge branch 'stable-4.11' into stable-5.0David Pursehouse2018-08-315-97/+96
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.11: 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: I5ebb1058927ea5a478eae9e44b7d96f123a22523 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | * 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>