summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.ssh.jsch.test
Commit message (Collapse)AuthorAgeFilesLines
* Don't export package from test bundleThomas Wolf2020-12-281-4/+0
| | | | | | | | | | Do not export the test-only package org.eclipse.jgit.transport from bundle org.eclipse.jgit.ssh.jsch.test. Doing so can confuse the build in Eclipse: other bundles that import this package may then also pick up this test package, leading to non-test sources depending on test sources and to build cycles. Change-Id: I9f73b7a8d13bc4a2fe58bd2f1d33068164a13991 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* Prepare 5.11.0-SNAPSHOT buildsMatthias Sohn2020-12-022-9/+9
| | | | | Change-Id: I91e5532526775191fbd34f81e2ef777cba605e3b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Ignore missing javadoc tags in test bundlesMatthias Sohn2020-11-291-2/+2
| | | | | | | | It seems Eclipse 4.18 reports them as error whereas earlier versions ignored this maybe since we don't require javadoc comments for all the test bundles. Change-Id: I3f4d42ce681ea5c2b4b302991d2641290ac8561d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Revert "Client-side protocol V2 support for fetching"Thomas Wolf2020-11-031-26/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f802f06e7fd5a98f256b7b7727598491f563bf2f. I had misunderstood how protocol V2 works. This implementation only works if the negotiation during fetch is done in one round. Fixing this is substantial work in BasePackFetchConnection. Basically I think I'd have to change back negotiate to the V0 version, and have a doFetch() that does if protocol V2 doFetchV2() else doFetchV0() with doFetchV0 the old code, and doFetchV2 completely new. Plus there would need to be a HTTP test case requiring several negotiation rounds. This is a couple of days work at least, and I don't know when I will have the time to revisit this. So although the rest of the code is fine I prefer to back this out completely and not leave a only half working implementation in the code for an indeterminate time. Bug: 553083 Change-Id: Icbbbb09882b3b83f9897deac4a06d5f8dc99d84e Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* Client-side protocol V2 support for fetchingThomas Wolf2020-10-291-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make all transports request protocol V2 when fetching. Depending on the transport, set the GIT_PROTOCOL environment variable (file and ssh), pass the Git-Protocol header (http), or set the hidden "\0version=2\0" (git anon). We'll fall back to V0 if the server doesn't reply with a version 2 answer. A user can control which protocol the client requests via the git config protocol.version; if not set, JGit requests protocol V2 for fetching. Pushing always uses protocol V0 still. In the API, there is only a new Transport.openFetch() version that takes a collection of RefSpecs plus additional patterns to construct the Ref prefixes for the "ls-refs" command in protocol V2. If none are given, the server will still advertise all refs, even in protocol V2. BasePackConnection.readAdvertisedRefs() handles falling back to protocol V0. It newly returns true if V0 was used and the advertised refs were read, and false if V2 is used and an explicit "ls-refs" is needed. (This can't be done transparently inside readAdvertisedRefs() because a "stateless RPC" transport like TransportHttp may need to open a new connection for writing.) BasePackFetchConnection implements the changes needed for the protocol V2 "fetch" command (simplified ACK handling, delimiters, section headers). In TransportHttp, change readSmartHeaders() to also recognize the "version 2" packet line as a valid smart server indication. Adapt tests, and run all the HTTP tests not only with both HTTP connection factories (JDK and Apache HttpClient) but also with both protocol V0 and V2. Do the same for the SSH transport tests. Bug: 553083 Change-Id: Ice9866aa78020f5ca8f397cde84dc224bf5d41b4 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 5.10.0-SNAPSHOT buildsMatthias Sohn2020-08-272-9/+9
| | | | | Change-Id: I9a2b39e9e85f27179ceb3b1709d75c466089a3bc Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 5.9.0-SNAPSHOT buildsMatthias Sohn2020-06-092-9/+9
| | | | | Change-Id: Ia998e2772df1285a4c674b07201f15d53156eb78 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix typo in org.eclipse.jgit.ssh.jsch.test MANIFESTThomas Wolf2020-06-041-1/+1
| | | | Change-Id: I1d1484b32aa0c6464b5c38f2a2987716589ae9aa Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* Decouple JSch from JGit CoreMatthias Sohn2020-06-0122-0/+1744
Motivation: JSch serves as 'default' implementations of the SSH transport. If a client application does not use it then there is no need to pull in this dependency. Move the classes depending on JSch to an OSGi fragment extending the org.eclipse.jgit bundle and keep them in the same package as before since moving them to another package would break API. Defer moving them to a separate package to the next major release. Add a new feature org.eclipse.jgit.ssh.jsch feature to enable installation. With that users can now decide which of the ssh client integrations (JCraft JSch or Apache Mina SSHD) they want to install. We will remove the JCraft JSch integration in a later step due to the reasons discussed in bug 520927. Bug: 553625 Change-Id: I5979c8a9dbbe878a2e8ac0fbfde7230059d74dc2 Also-by: Michael Dardis <git@md-5.net> Signed-off-by: Michael Dardis <git@md-5.net> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: David Ostrovsky <david@ostrovsky.org>