summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Prepare 5.0.2-SNAPSHOT buildsMatthias Sohn2018-06-2256-357/+357
| | | | | Change-Id: I65e83f39a4082278c4cb809dbb08d44a119cebe0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v5.0.1.201806211838-rv5.0.1.201806211838-rMatthias Sohn2018-06-2256-59/+59
| | | | | Change-Id: I594cd85d46698953c27da3687e4ec40aeb73b445 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add project-info reports to maven siteMatthias Sohn2018-06-211-0/+18
| | | | | Change-Id: I290d9c4a27d2ca1b9071f39639195e0d85799c00 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix maven site generation failing with javadoc errorsMatthias Sohn2018-06-212-1/+21
| | | | | | | | The same errors are suppressed when generating javadoc. Suppress the errors during site generation. Change-Id: I83bd1c10e5de82f47c351e7edf2c9230be4b1f21 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Respect "unshallow" lines in protocol v2Jonathan Nieder2018-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If I run git config --global protocol.version 2 mkdir repo cd repo git init --bare git remote add origin https://go.googlesource.com/proposal git fetch --depth=1 git fetch --unshallow then I expect to have a full history, just as though I had fetched without --depth in the first place. Instead, it reports success but does not fetch enough objects: $ git fsck notice: HEAD points to an unborn branch (master) Checking object directories: 100% (256/256), done. Checking objects: 100% (468/468), done. broken link from commit 2c6bc83f234085c8eadb7ea33405ce6223c44d1b to commit 878975cf2b600675b4c905e5d9591bd24541ae9e missing commit 878975cf2b600675b4c905e5d9591bd24541ae9e dangling commit 314be00dae78dd526851f5635e6349014e2ad0c2 The false success indicates problems in the client and the server. Git 2.18-rc2 (the client) ought to have been more defensive, noticing the incomplete history. The greater error is in JGit (the server), which neglects to send the objects requested. When serving protocol v0 requests, JGit sends the correct objects by taking unshallowCommits into account when generating the pack to send to the client. Do the same in the protocol v2 code path. I forgot to do this in v5.0.0.201806050710-rc3~6 (Teach UploadPack shallow fetch in protocol v2, 2018-03-15). Reported-by: Russ Cox <rsc@golang.org> Change-Id: I282b45f47616a641b9e8d6210b4a070d3efdbb9b Signed-off-by: Jonathan Nieder <jrn@google.com>
* Merge branch 'stable-4.9' into stable-5.0David Pursehouse2018-06-200-0/+0
|\ | | | | | | | | | | | | | | * stable-4.9: Temporarily @Ignore flaky CommitCommandTest methods Change-Id: I2db9bf014ba222d77851cc58da7ee5a0e8b344f6 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * Merge branch 'stable-4.8' into stable-4.9David Pursehouse2018-06-200-0/+0
| |\ | | | | | | | | | | | | | | | | | | | | | * stable-4.8: Temporarily @Ignore flaky CommitCommandTest methods Change-Id: I318813d19445ab7c44384015d36830ed02b8b590 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | * Merge branch 'stable-4.7' into stable-4.8David Pursehouse2018-06-201-0/+3
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.7: Temporarily @Ignore flaky CommitCommandTest methods Change-Id: I016c9b3ec0081542bb903f361d9a3af1ea746ae3 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 5.0.1-SNAPSHOT buildsMatthias Sohn2018-06-1356-357/+357
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iadf12dbdd63ef17c3f712c0fc18495304aa35016 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | JGit v5.0.0.201806131550-rv5.0.0.201806131550-rMatthias Sohn2018-06-1356-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ia2d548676217250593c3f0c383aec19e12e5e4a4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | JGit v5.0.0.201806131210-rMatthias Sohn2018-06-1356-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iedccfcaf57c11822f1faf5d5195357de42b2a14e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | Downgrade Apache httpclient to 4.5.2.v20170210-0925Matthias Sohn2018-06-132-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eclipse platform uses this version from the Oxygen Orbit release for Photon. In order to avoid that we end up with two slightly different versions in the same p2 repository of the simultaneous release we downgrade temporarily from the version 4.5.2.v20180410-1551 in the Photon Orbit release. See https://dev.eclipse.org/mhonarc/lists/cross-project-issues-dev/msg15659.html Change-Id: Id46a840aa4b1010af7fe311498f17f1f2e5b81e0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | RefUpdateTest: Refactor to not use deprecated Repository#getAllRefsDavid Pursehouse2018-06-131-17/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I157e62a0e1479d4bc95ef867e616ca8a30041759 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | Propagate failure of ssh command to caller of SshSupportMatthias Sohn2018-06-137-28/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When SshSupport.runSshCommand fails since the executed external ssh command failed throw a CommandFailedException. If discovery of LFS server fails due to failure of the git-lfs-authenticate command chain the CommandFailureException to the LfsConfigInvalidException in order to allow root cause analysis in the application using that. Change-Id: I2f9ea2be11274549f6d845937164c248b3d840b2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | Make JGit describe behaves same as c-git for lightweight tagsMarcel Trautwein2018-06-132-38/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JGit now considers lightweight tags only if the --tags option is set i.e. `git.describe().setAllTags(true)` has to be set, else the default is now as in c git: Only annotated tags are evaluated unless you pass true equivalent to --tags (or --all) by the option setAllTags. Hint: This (still) doesn't address any difference between c-git `--all` and `!--all --tags` behavior; perhaps this might be a follow up request Bug: 423206 Change-Id: I9a3699756df0b9c6a7c74a7e8887dea0df17c8e7 Signed-off-by: Marcel Trautwein <me+eclipse@childno.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | Fix issues with LFS on GitHub (SSH)Markus Duft2018-06-125-16/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * URIish seems to have a tiny feature (bug?). The path of the URI starts with a '/' only if the URI has a port set (it seems). * GitHub does not return SSH authorization on a single line as Gerrit does - need to account for that. * Increase the SSH git-lfs-authenticate timeout, as GitHub sometimes responds slower than expected. * Guard against NPE in case the download action does not contain any additional headers. Change-Id: Icd1ead3d015479fd4b8bbd42ed42129b0abfb95c Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
* | | | | | Merge branch 'stable-4.11' into stable-5.0Matthias Sohn2018-06-110-0/+0
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.11: Change-Id: Iec2dafd00979ab02f5ab698fc514866255007de5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * \ \ \ \ \ Merge branch 'stable-4.10' into stable-4.11Matthias Sohn2018-06-110-0/+0
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.10: Ensure DirectoryStream is closed promptly Change-Id: I2c0d5ea96b2c96336908674032d0f7d39dc062b9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | | | Merge branch 'stable-4.9' into stable-4.10Matthias Sohn2018-06-111-13/+13
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: Ensure DirectoryStream is closed promptly Change-Id: I62674a1db9266c04fb353ab697e2c0a24a7369b7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | | | Merge "Merge branch 'stable-4.10' into stable-4.11" into stable-4.11Matthias Sohn2018-05-103-30/+56
| |\ \ \ \ \ \ \
* | | | | | | | | Fix Javadoc typoMichael Keppler2018-06-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib4ebc57236bdea663f27295764886413e2550580 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | | Ensure Jsch checks all configured algorithmsThomas Wolf2018-06-101-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jsch checks only for the availability of the algorithms given by Jsch-internal config keys "CheckCiphers", "CheckKexes", and "CheckSignatures". If the ssh config defines any algorithms unknown to Jsch not listed in those keys, it'll still propose them during the negotiation phase, and run into an NPE later on if the server happens to propose such an algorithm and it gets chosen. Jsch reads those "CheckCiphers" and the other values from either a session-local config, or the global static Jsch config. It bypasses ~/.ssh/config for these values. Therefore, copy these values from the config as read from ~/.ssh/config into the session-specific config. That makes Jsch check _all_ configured algorithms up front, discarding any for which it has no implementation. Thus it proposes only algorithms it actually can handle. Bug: 535672 Change-Id: I6a68e54f4d9a3267e895c536bcf3c58099826ad5 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | | | | | Merge branch 'stable-4.9' into stable-5.0Matthias Sohn2018-06-100-0/+0
|\ \ \ \ \ \ \ \ \ | | |_|_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: Ensure DirectoryStream is closed promptly Change-Id: I447a01e1170db85fcf5978206ed35ad1956a2d82 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | | | | Ensure DirectoryStream is closed promptlyDave Borowitz2018-06-091-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the javadoc for Files.list: "The returned stream encapsulates a DirectoryStream. If timely disposal of file system resources is required, the try-with-resources construct should be used to ensure that the stream's close method is invoked after the stream operations are completed." This is the only call to Files#newDirectoryStream that is not already in a try-with-resources. Change-Id: I91e6c56b5d74e8435457ad6ed9e6b4b24d2aa14e (cherry picked from commit 1c16ea4601920c9dbc7a0202efc20137e1a63d55)
* | | | | | | | | RawTextTest#testBinary: use array comparison to compare arraysMatthias Sohn2018-06-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iac1feadf24858a0bdf0cb224f16b34e9498fe3bb Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | LFS: Better SSH authentication token timeout handlingMarkus Duft2018-06-091-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Larger eager timeout to compensate for high-latency lines * Respect eager timeout in case the server uses "expiresIn" Change-Id: Id87da1eea874e70b69eaccf35c84af4c3bb50770 Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
* | | | | | | | | Validate branch names on branch creationMatthias Sohn2018-06-092-6/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since v2.16.0-rc0~89^2~1 (branch: correctly reject refs/heads/{-dash,HEAD}, 2017-11-14), native git does not allow branch names - refs/heads/HEAD - starting with '-' Bug: 535655 Change-Id: Ib1c4ec9ea844073901a4ebe6a29ff6cc8ae58e93 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | Use constant for ".lock"Matthias Sohn2018-06-086-12/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id65dc94c970ffd3ca3d3d4a5d57123c95d29e8af Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | Simplify locking of FileRepository's index snapshotMatthias Sohn2018-06-081-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | synchronize on simple Object monitor instead of using ReentrantLock Change-Id: I897020ab35786336b51b0fef76ea6071aff8aefa Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | Refactor FileRepository.detectIndexChange()Matthias Sohn2018-06-081-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I50c751e2e90f685dc27043c569da2eb210d4611b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | Merge "Ensure index change event is fired when index snapshot changed" into ↵Jonathan Nieder2018-06-081-9/+26
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stable-5.0
| * | | | | | | | | Ensure index change event is fired when index snapshot changedMatthias Sohn2018-06-061-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that notifyIndexChanged is called every time we call FileSnapshot.save, except the first. Change-Id: I5a4e9826e791f518787366ae7c3a0ef3d416d2c1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | | Update to latest Photon Orbit R20180606145124Matthias Sohn2018-06-079-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | also add missing bundle org.hamcrest Change-Id: I88ad7769b8fda491fe3641ddaf0964ca55ffc0f6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | | Update maven plugins to fix Zip Slip vulnerabilityDavid Pursehouse2018-06-061-2/+2
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Zip Slip [1] is an arbitrary file write generic vulnerability, that can be achieved using a specially crafted zip (or bzip2, gzip, tar, xz, war) archive, that holds path traversal filenames. According to Maven's announcement [2] several plugins use plexus-archiver to unpack dependencies to disk and have been identified as potential triggers for exposing the vulnerability. Of those, JGit uses the maven-dependency-plugin and the maven-javadoc-plugin. Update them to the fixed versions reported in [2]. See the corresponding issues for the maven-dependency-plugin [3] and the maven-javadoc-plugin [4] for details. [1] https://snyk.io/research/zip-slip-vulnerability [2] https://maven.apache.org/security-plexus-archiver.html [3] https://issues.apache.org/jira/browse/MDEP-611 [4] https://issues.apache.org/jira/browse/MJAVADOC-520 Change-Id: Id3ab2d6161db240f2ab8f82298fa3ecd7a930a43 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | | Prepare 5.0.0-SNAPSHOT buildsMatthias Sohn2018-06-0556-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I9acca328146aa7100fbc1b457fcb1f8fd87cf52a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | JGit v5.0.0.201806050710-rc3v5.0.0.201806050710-rc3Matthias Sohn2018-06-0556-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic7a6a87dd3a21351e60fbf6cd330456adf1f6800 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | Teach UploadPack "filter" in protocol v2 fetchJonathan Tan2018-06-042-1/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the configuration variable uploadpack.allowfilter is true, advertise that "filter" is supported, and support it if the client sends such an argument. Change-Id: I7de66c0a0ada46ff71c5ba124d4ffa7c47254c3b Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
* | | | | | | | | Refactor test of capabilities outputJonathan Tan2018-06-041-11/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A subsequent patch will dynamically generate the capability advertisement, so the capability advertisements produced are not always the same. Separate the checking of the advertisements into its own test method. Change-Id: I768d14b9d1a244d5d886c42ffd62ef3957b518fb Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
* | | | | | | | | Refactor v2 advertisement into own functionJonathan Tan2018-06-041-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A subsequent patch needs dynamic generation of this advertisement depending on a configuration variable in the underlying repository, so refactor it into a function instead of using a constant list. Change-Id: Ie00584add1fb56c9e88c7b57f75703981ea5bb85 Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
* | | | | | | | | Refactor parsing of "filter" into its own methodJonathan Tan2018-06-041-24/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of protocol v2 will also need to parse the "filter" option, so refactor it into its own method. Change-Id: I751f6e6ca63fab873298594653a3885202297a2e Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
* | | | | | | | | Disallow unknown args to "fetch" in protocol v2Jonathan Tan2018-06-042-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JGit's implementation of the fetch command of protocol v2, unlike its implementation of ls-refs, currently tolerates unknown arguments. Tighten fetch to not allow unrecognized arguments and add tests to verify this behavior for both ls-refs and fetch. Change-Id: I321161d568bd638252fab1a47b06b924d472a669 Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
* | | | | | | | | Teach UploadPack shallow fetch in protocol v2Jonathan Tan2018-06-045-9/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the "shallow" and "deepen" parameters in the "fetch" command in the fetch-pack/upload-pack protocol v2. Advertise support for this in the capability advertisement. TODO: implement deepen-relative, deepen-since, deepen-not Change-Id: I7ffd80d6c38872f9d713ac7d6e0412106b3766d7 Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com>
* | | | | | | | | Refactor unshallowCommits to local variableJonathan Tan2018-06-041-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reduces the amount of state held as instance variables in UploadPack, and makes it easier for a future patch to contain a clearer version of UploadPack#processShallow. Change-Id: I6df80b42f9e5118fda1420692e02e417670cced3 Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com>
* | | | | | | | | Add protocol v2 support in httpJonathan Tan2018-06-046-7/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach UploadPack to support protocol v2 with non-bidirectional pipes, and add support to the HTTP protocol for v2. This is only activated if the repository's config has "protocol.version" equal to 2. Change-Id: I093a14acd2c3850b8b98e14936a716958f35a848 Helped-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com>
* | | | | | | | | Give info/refs services more control over responseJonathan Tan2018-06-041-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, SmartServiceInfoRefs always prints "# service=serviceName" followed by a flush packet in response to an info/refs request, and then hands it off to the specific service class. Printing of "# service=serviceName" is mandated for protocol v0, but not v2. Therefore, the existing code works for protocol v0, but whenever a service that supports protocol v2 receives an info/refs request, it must first determine which protocol version is to be used (depending on, for example, the request and any relevant configuration variables), and then decide if "# service=serviceName" needs to be printed. Create a new method that v2-supporting service classes can override, covering the printing of both "# service=serviceName" and everything that the #advertise method prints. This will be used in a subsequent commit in which UploadPackServlet (and the other classes it uses) is updated to support protocol v2. Change-Id: Ia026b06e96a6b15937514096babd024ef77df1ea Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com>
* | | | | | | | | Chain RemoteAddCommand methodsMincong HUANG2018-06-021-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1cf64c90a5cd2220034810b0d65d59582b420c4e Signed-off-by: Mincong Huang <mincong.h@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | Update target platforms to Orbit R20180531190352-PhotonMatthias Sohn2018-06-019-44/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the final Photon Orbit release Change-Id: Ie07eb3dedb5ccb6a2a7b0ad2c90593a07fdd240e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>