]> source.dussan.org Git - jgit.git/commit
Move first line parsing for v0/v1 pack negotiation out of UploadPack 90/129590/18
authorIvan Frade <ifrade@google.com>
Mon, 17 Sep 2018 18:48:48 +0000 (11:48 -0700)
committerIvan Frade <ifrade@google.com>
Fri, 12 Oct 2018 20:59:06 +0000 (13:59 -0700)
commit6aca8899a5c02b3f6be7b9196cf5e935914476f0
treebec623c7251d03297684721771d131434815cd30
parentb3adaf7741094c30f77ea933e7faa3977291d870
Move first line parsing for v0/v1 pack negotiation out of UploadPack

In protocol v0/v1 pack negotiation, the first want line contains the
options the client wants in effect. This parsing is done in UploadPack
but it doesn't have any interaction with that class.

Move the code to its own class and package, mark the current one
as deprecated (it is public API) and add unit tests.

Take the chance to move the parsing code from the constructor to a
factory method, making the class a simple container of results.

Change-Id: I1757f535dda78a4111a1c12c3a3b455a4b6f0c51
Signed-off-by: Ivan Frade <ifrade@google.com>
org.eclipse.jgit.http.server/META-INF/MANIFEST.MF
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitSmartHttpTools.java
org.eclipse.jgit.test/META-INF/MANIFEST.MF
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/transport/parser/FirstWantTest.java [new file with mode: 0644]
org.eclipse.jgit/META-INF/MANIFEST.MF
org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/parser/FirstWant.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java