]> source.dussan.org Git - jgit.git/commit
Support protocol v2 want-ref in UploadPack 64/126564/4
authorJonathan Tan <jonathantanmy@google.com>
Tue, 24 Jul 2018 15:41:17 +0000 (08:41 -0700)
committerJonathan Nieder <jrn@google.com>
Fri, 10 Aug 2018 22:44:49 +0000 (18:44 -0400)
commitc477b0ddcb68ac0b1c26270187d82fccc70802c6
tree7609991fe05b4fd48b0b14709dc58d2ec1811ead
parentbd1a82502680b5de5bf86f6c4470185fd1602386
Support protocol v2 want-ref in UploadPack

UploadPack already allows the client to send wanted OIDs as "want"
lines. Extend UploadPack to also allow the client to send wanted ref
names as "want-ref" lines when the fetch is done using protocol v2.

The corresponding Git commit is 516e2b76bd ("upload-pack: implement
ref-in-want", 2018-06-28).

To support a two-stage rollout, two configuration variables are
provided: uploadpack.allowrefinwant (default "false") allows clients to
specify "want-ref" in their requests, and uploadpack.advertiserefinwant
(default "true") makes UploadPack advertise this capability. If
uploadpack.allowrefinwant is true but uploadpack.advertiserefinwant is
false, UploadPack will not advertise that it supports "want-ref", but it
will support it.

Change-Id: I3c24077949640d453af90d81a7f48ce4b8ac9833
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/TransferConfig.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java