]> source.dussan.org Git - jgit.git/commit
Teach UploadPack basic "fetch" command 49/119449/11
authorJonathan Tan <jonathantanmy@google.com>
Fri, 23 Feb 2018 22:07:02 +0000 (14:07 -0800)
committerJonathan Nieder <jrn@google.com>
Mon, 23 Apr 2018 17:26:51 +0000 (10:26 -0700)
commitadc73c4ba1c5a0ddfaee9537df438bfa14f38a62
treea0a2e7a166c32bad8068ab697b79b5f1179d11a8
parent038765cc556b84e1bf089df5a98c1b742c176e12
Teach UploadPack basic "fetch" command

Add basic support for the "fetch" command in the fetch-pack/upload-pack
protocol v2. This patch teaches "have" and "done".

The protocol specification (Documentation/technical/protocol-v2.txt in
the Git project) states:

    want <oid>
Indicates to the server an object which the client wants to
retrieve.  Wants can be anything and are not limited to
advertised objects.

It is unspecified whether the server should respect the
uploadpack.allowtipsha1inwant option etc. when serving packfiles. This
patch is conservative in that the server respects them.

Change-Id: I3dbec172239712ef9286a15b8407e86b87ea7863
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/GitProtocolConstants.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java