Skip to content

Refactor fetch negotiation into its own API

Jonathan Tan git 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest7 patches 2 repliesIn review
  2. v28 patches 8 repliesSuperseded
  3. v16 patches 13 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7fetch-pack: split up everything_local()fetch-pack.c+30 -90 replies
2/7fetch-pack: clear marks before re-markingfetch-pack.c+3 -30 replies
3/7fetch-pack: directly end negotiation if ACK readyfetch-pack.c+5 -41 reply
4/7fetch-pack: use ref adv. to prune "have" sentfetch-pack.c t/t5500-fetch-pack.sh+36 -30 replies
5/7fetch-pack: make negotiation-related vars localfetch-pack.c+69 -470 replies
6/7fetch-pack: move common check and marking togetherfetch-pack.c+4 -20 replies
7/7fetch-pack: introduce negotiator APIMakefile fetch-negotiator.c fetch-negotiator.h +4 more+292 -1670 replies

Reviews trailers per patch

None of the 7 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchBrandon Williams
SeriesR-b
1/7
2/7
3/7
4/7
5/7
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/7] Refactor fetch negotiation into its own API

Thanks, Brandon and Junio, for your comments.

Updates since v2:
- nothing new in patches 1 and 2
- patch 3: now clear priority queue unconditionally once we are done with it (as requested by Brandon in a comment for a later patch)
- patch 4: updated commit message to not mention everything_local() (as pointed out by Brandon), updated test to not rely on the fact that fetch-pack uses prefix matching (thanks, Junio, for the observation)
- patch 5: used a more descriptive name ("struct negotiation_state") for the struct, instead of "struct data"
- squashed patch 8 into patch 7; this means that the comments are not moved verbatim, but for the reviewer, verbatim-ness of comments is probably not that important anyway

Jonathan Tan (7):
fetch-pack: split up everything_local()
fetch-pack: clear marks before re-marking
fetch-pack: directly end negotiation if ACK ready
fetch-pack: use ref adv. to prune "have" sent
fetch-pack: make negotiation-related vars local
fetch-pack: move common check and marking together
fetch-pack: introduce negotiator API

 Makefile              |   2 +
 fetch-negotiator.c    |   8 ++
 fetch-negotiator.h    |  57 ++++++++++
 fetch-pack.c          | 255 ++++++++++++++----------------------------
 negotiator/default.c  | 176 +++++++++++++++++++++++++++++
 negotiator/default.h  |   8 ++
 object.h              |   3 +-
 t/t5500-fetch-pack.sh |  33 ++++++
 8 files changed, 373 insertions(+), 169 deletions(-)
 create mode 100644 fetch-negotiator.c
 create mode 100644 fetch-negotiator.h
 create mode 100644 negotiator/default.c
 create mode 100644 negotiator/default.h
Signature · 1 line
2.17.0.582.gccdcbd54c4