git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH v5 00/35] protocol version 2
@ 2018-03-14 18:31 Brandon Williams
  2018-03-14 18:31 ` [PATCH v5 01/35] pkt-line: introduce packet_read_with_status Brandon Williams
                   ` (36 more replies)
  0 siblings, 37 replies; 85+ messages in thread
From: Brandon Williams @ 2018-03-14 18:31 UTC (permalink / raw)
  To: git
  Cc: git, gitster, jrnieder, pclouds, peff, sbeller, stolee,
	jonathantanmy, Brandon Williams

Changes in v5:

 * Tweaked the API of the packet_read_with_status function so that it
   wrote the pktlen value even in the presence of non-normal reads
   (flush, delim, EOF).

 * Changed the format of ref-patterns for the ls-refs server command.
   They are now ref-prefixes and matching is done as a simple prefix
   match against refnames.

 * Tweaked the API for server commands.  Instead of the server code
   dispatching the command and passing it an argv_array of keys and
   args, I changed it so that it passes it an argv_array of keys and
   then passes off the packet_reader so that the command can do the
   reading of the remainder of the input itself.  This is to account for
   future commands (e.g. push) where the argument stream will include a
   packfile and doesn't make much sense to push into an argv_array.

 * Various documentation changes, one of which calls out that the
   protocol is stateless by default and if state needs to be introduced
   at a later point, it must be hidden behind a capability which is only
   advertised when using transports which support state on the server
   side.

v4 found at:
https://public-inbox.org/git/20180228232252.102167-1-bmwill@google.com/

Brandon Williams (35):
  pkt-line: introduce packet_read_with_status
  pkt-line: allow peeking a packet line without consuming it
  pkt-line: add delim packet support
  upload-pack: convert to a builtin
  upload-pack: factor out processing lines
  transport: use get_refs_via_connect to get refs
  connect: convert get_remote_heads to use struct packet_reader
  connect: discover protocol version outside of get_remote_heads
  transport: store protocol version
  protocol: introduce enum protocol_version value protocol_v2
  test-pkt-line: introduce a packet-line test helper
  serve: introduce git-serve
  ls-refs: introduce ls-refs server command
  connect: request remote refs using v2
  transport: convert get_refs_list to take a list of ref prefixes
  transport: convert transport_get_remote_refs to take a list of ref
    prefixes
  ls-remote: pass ref prefixes when requesting a remote's refs
  fetch: pass ref prefixes when fetching
  push: pass ref prefixes when pushing
  upload-pack: introduce fetch server command
  fetch-pack: perform a fetch using v2
  fetch-pack: support shallow requests
  connect: refactor git_connect to only get the protocol version once
  connect: don't request v2 when pushing
  transport-helper: remove name parameter
  transport-helper: refactor process_connect_service
  transport-helper: introduce stateless-connect
  pkt-line: add packet_buf_write_len function
  remote-curl: create copy of the service name
  remote-curl: store the protocol version the server responded with
  http: allow providing extra headers for http requests
  http: don't always add Git-Protocol header
  http: eliminate "# service" line when using protocol v2
  remote-curl: implement stateless-connect command
  remote-curl: don't request v2 when pushing

 .gitignore                              |   1 +
 Documentation/Makefile                  |   1 +
 Documentation/gitremote-helpers.txt     |  32 ++
 Documentation/technical/protocol-v2.txt | 398 +++++++++++++++
 Makefile                                |   7 +-
 builtin.h                               |   2 +
 builtin/clone.c                         |   2 +-
 builtin/fetch-pack.c                    |  20 +-
 builtin/fetch.c                         |  21 +-
 builtin/ls-remote.c                     |  15 +-
 builtin/receive-pack.c                  |   6 +
 builtin/remote.c                        |   2 +-
 builtin/send-pack.c                     |  20 +-
 builtin/serve.c                         |  30 ++
 builtin/upload-pack.c                   |  74 +++
 connect.c                               | 364 ++++++++++----
 connect.h                               |   7 +
 fetch-pack.c                            | 339 ++++++++++++-
 fetch-pack.h                            |   4 +-
 git.c                                   |   2 +
 http-backend.c                          |   8 +-
 http.c                                  |  25 +-
 http.h                                  |   7 +
 ls-refs.c                               |  96 ++++
 ls-refs.h                               |  10 +
 pkt-line.c                              | 133 ++++-
 pkt-line.h                              |  78 +++
 protocol.c                              |   2 +
 protocol.h                              |   1 +
 refs.c                                  |  14 +
 refs.h                                  |   7 +
 remote-curl.c                           | 280 ++++++++++-
 remote.h                                |  11 +-
 serve.c                                 | 257 ++++++++++
 serve.h                                 |  15 +
 t/helper/test-pkt-line.c                |  64 +++
 t/t5701-git-serve.sh                    | 176 +++++++
 t/t5702-protocol-v2.sh                  | 273 +++++++++++
 transport-helper.c                      |  87 ++--
 transport-internal.h                    |  11 +-
 transport.c                             | 130 +++--
 transport.h                             |  18 +-
 upload-pack.c                           | 615 ++++++++++++++++++------
 upload-pack.h                           |  23 +
 44 files changed, 3320 insertions(+), 368 deletions(-)
 create mode 100644 Documentation/technical/protocol-v2.txt
 create mode 100644 builtin/serve.c
 create mode 100644 builtin/upload-pack.c
 create mode 100644 ls-refs.c
 create mode 100644 ls-refs.h
 create mode 100644 serve.c
 create mode 100644 serve.h
 create mode 100644 t/helper/test-pkt-line.c
 create mode 100755 t/t5701-git-serve.sh
 create mode 100755 t/t5702-protocol-v2.sh
 create mode 100644 upload-pack.h


base-commit: 5be1f00a9a701532232f57958efab4be8c959a29
-- 
2.16.2.804.g6dcf76e118-goog


^ permalink raw reply	[flat|nested] 85+ messages in thread

end of thread, other threads:[~2018-03-30 19:06 UTC | newest]

Thread overview: 85+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-14 18:31 [PATCH v5 00/35] protocol version 2 Brandon Williams
2018-03-14 18:31 ` [PATCH v5 01/35] pkt-line: introduce packet_read_with_status Brandon Williams
2018-03-14 21:33   ` Junio C Hamano
2018-03-15 17:28     ` Brandon Williams
2018-03-15 18:37       ` Junio C Hamano
2018-03-14 18:31 ` [PATCH v5 02/35] pkt-line: allow peeking a packet line without consuming it Brandon Williams
2018-03-14 18:31 ` [PATCH v5 03/35] pkt-line: add delim packet support Brandon Williams
2018-03-14 18:31 ` [PATCH v5 04/35] upload-pack: convert to a builtin Brandon Williams
2018-03-14 18:31 ` [PATCH v5 05/35] upload-pack: factor out processing lines Brandon Williams
2018-03-14 18:31 ` [PATCH v5 06/35] transport: use get_refs_via_connect to get refs Brandon Williams
2018-03-14 18:31 ` [PATCH v5 07/35] connect: convert get_remote_heads to use struct packet_reader Brandon Williams
2018-03-14 18:31 ` [PATCH v5 08/35] connect: discover protocol version outside of get_remote_heads Brandon Williams
2018-03-14 18:31 ` [PATCH v5 09/35] transport: store protocol version Brandon Williams
2018-03-14 18:31 ` [PATCH v5 10/35] protocol: introduce enum protocol_version value protocol_v2 Brandon Williams
2018-03-14 18:31 ` [PATCH v5 11/35] test-pkt-line: introduce a packet-line test helper Brandon Williams
2018-03-14 18:31 ` [PATCH v5 12/35] serve: introduce git-serve Brandon Williams
2018-03-14 22:01   ` Junio C Hamano
2018-03-15 17:27     ` Brandon Williams
2018-03-14 18:31 ` [PATCH v5 13/35] ls-refs: introduce ls-refs server command Brandon Williams
2018-03-14 18:31 ` [PATCH v5 14/35] connect: request remote refs using v2 Brandon Williams
2018-03-14 18:31 ` [PATCH v5 15/35] transport: convert get_refs_list to take a list of ref prefixes Brandon Williams
2018-03-14 18:31 ` [PATCH v5 16/35] transport: convert transport_get_remote_refs " Brandon Williams
2018-03-14 18:31 ` [PATCH v5 17/35] ls-remote: pass ref prefixes when requesting a remote's refs Brandon Williams
2018-03-14 18:31 ` [PATCH v5 18/35] fetch: pass ref prefixes when fetching Brandon Williams
2018-03-14 18:31 ` [PATCH v5 19/35] push: pass ref prefixes when pushing Brandon Williams
2018-03-14 18:31 ` [PATCH v5 20/35] upload-pack: introduce fetch server command Brandon Williams
2018-03-14 18:31 ` [PATCH v5 21/35] fetch-pack: perform a fetch using v2 Brandon Williams
2018-03-14 18:31 ` [PATCH v5 22/35] fetch-pack: support shallow requests Brandon Williams
2018-03-14 18:32 ` [PATCH v5 23/35] connect: refactor git_connect to only get the protocol version once Brandon Williams
2018-03-14 18:32 ` [PATCH v5 24/35] connect: don't request v2 when pushing Brandon Williams
2018-03-14 18:32 ` [PATCH v5 25/35] transport-helper: remove name parameter Brandon Williams
2018-03-14 18:32 ` [PATCH v5 26/35] transport-helper: refactor process_connect_service Brandon Williams
2018-03-14 18:32 ` [PATCH v5 27/35] transport-helper: introduce stateless-connect Brandon Williams
2018-03-14 18:32 ` [PATCH v5 28/35] pkt-line: add packet_buf_write_len function Brandon Williams
2018-03-14 18:32 ` [PATCH v5 29/35] remote-curl: create copy of the service name Brandon Williams
2018-03-14 18:32 ` [PATCH v5 30/35] remote-curl: store the protocol version the server responded with Brandon Williams
2018-03-14 18:32 ` [PATCH v5 31/35] http: allow providing extra headers for http requests Brandon Williams
2018-03-14 18:32 ` [PATCH v5 32/35] http: don't always add Git-Protocol header Brandon Williams
2018-03-14 18:32 ` [PATCH v5 33/35] http: eliminate "# service" line when using protocol v2 Brandon Williams
2018-03-14 18:32 ` [PATCH v5 34/35] remote-curl: implement stateless-connect command Brandon Williams
2018-03-14 18:32 ` [PATCH v5 35/35] remote-curl: don't request v2 when pushing Brandon Williams
2018-03-15 17:31 ` [PATCH v6 00/35] protocol version 2 Brandon Williams
2018-03-15 17:31   ` [PATCH v6 01/35] pkt-line: introduce packet_read_with_status Brandon Williams
2018-03-15 17:31   ` [PATCH v6 02/35] pkt-line: allow peeking a packet line without consuming it Brandon Williams
2018-03-15 17:31   ` [PATCH v6 03/35] pkt-line: add delim packet support Brandon Williams
2018-03-15 17:31   ` [PATCH v6 04/35] upload-pack: convert to a builtin Brandon Williams
2018-03-15 17:31   ` [PATCH v6 05/35] upload-pack: factor out processing lines Brandon Williams
2018-03-15 17:31   ` [PATCH v6 06/35] transport: use get_refs_via_connect to get refs Brandon Williams
2018-03-15 17:31   ` [PATCH v6 07/35] connect: convert get_remote_heads to use struct packet_reader Brandon Williams
2018-03-27 15:27     ` Duy Nguyen
2018-03-27 16:11       ` Jeff King
2018-03-27 16:25         ` Duy Nguyen
2018-03-27 16:39           ` Duy Nguyen
2018-03-27 16:58             ` Brandon Williams
2018-03-15 17:31   ` [PATCH v6 08/35] connect: discover protocol version outside of get_remote_heads Brandon Williams
2018-03-15 17:31   ` [PATCH v6 09/35] transport: store protocol version Brandon Williams
2018-03-15 17:31   ` [PATCH v6 10/35] protocol: introduce enum protocol_version value protocol_v2 Brandon Williams
2018-03-15 17:31   ` [PATCH v6 11/35] test-pkt-line: introduce a packet-line test helper Brandon Williams
2018-03-15 17:31   ` [PATCH v6 12/35] serve: introduce git-serve Brandon Williams
2018-03-15 17:31   ` [PATCH v6 13/35] ls-refs: introduce ls-refs server command Brandon Williams
2018-03-15 17:31   ` [PATCH v6 14/35] connect: request remote refs using v2 Brandon Williams
2018-03-15 17:31   ` [PATCH v6 15/35] transport: convert get_refs_list to take a list of ref prefixes Brandon Williams
2018-03-15 17:31   ` [PATCH v6 16/35] transport: convert transport_get_remote_refs " Brandon Williams
2018-03-15 17:31   ` [PATCH v6 17/35] ls-remote: pass ref prefixes when requesting a remote's refs Brandon Williams
2018-03-15 17:31   ` [PATCH v6 18/35] fetch: pass ref prefixes when fetching Brandon Williams
2018-03-15 17:31   ` [PATCH v6 19/35] push: pass ref prefixes when pushing Brandon Williams
2018-03-15 17:31   ` [PATCH v6 20/35] upload-pack: introduce fetch server command Brandon Williams
2018-03-15 17:31   ` [PATCH v6 21/35] fetch-pack: perform a fetch using v2 Brandon Williams
2018-03-15 17:31   ` [PATCH v6 22/35] fetch-pack: support shallow requests Brandon Williams
2018-03-15 17:31   ` [PATCH v6 23/35] connect: refactor git_connect to only get the protocol version once Brandon Williams
2018-03-15 17:31   ` [PATCH v6 24/35] connect: don't request v2 when pushing Brandon Williams
2018-03-15 17:31   ` [PATCH v6 25/35] transport-helper: remove name parameter Brandon Williams
2018-03-15 17:31   ` [PATCH v6 26/35] transport-helper: refactor process_connect_service Brandon Williams
2018-03-15 17:31   ` [PATCH v6 27/35] transport-helper: introduce stateless-connect Brandon Williams
2018-03-15 17:31   ` [PATCH v6 28/35] pkt-line: add packet_buf_write_len function Brandon Williams
2018-03-15 17:31   ` [PATCH v6 29/35] remote-curl: create copy of the service name Brandon Williams
2018-03-15 17:31   ` [PATCH v6 30/35] remote-curl: store the protocol version the server responded with Brandon Williams
2018-03-15 17:31   ` [PATCH v6 31/35] http: allow providing extra headers for http requests Brandon Williams
2018-03-15 17:31   ` [PATCH v6 32/35] http: don't always add Git-Protocol header Brandon Williams
2018-03-15 17:31   ` [PATCH v6 33/35] http: eliminate "# service" line when using protocol v2 Brandon Williams
2018-03-15 17:31   ` [PATCH v6 34/35] remote-curl: implement stateless-connect command Brandon Williams
2018-03-15 17:31   ` [PATCH v6 35/35] remote-curl: don't request v2 when pushing Brandon Williams
2018-03-30  9:29 ` [PATCH] {fetch,upload}-pack: clearly mark unreachable v2 code Ævar Arnfjörð Bjarmason
2018-03-30 19:03   ` Brandon Williams
2018-03-30 19:06     ` Stefan Beller

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).