]> git.ipfire.org Git - thirdparty/git.git/commit - fetch-pack.c
fetch-pack: introduce negotiator API
authorJonathan Tan <jonathantanmy@google.com>
Thu, 14 Jun 2018 22:54:28 +0000 (15:54 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 15 Jun 2018 15:44:24 +0000 (08:44 -0700)
commitec06283844a90c3e9440286401e9ad7d86daa5ae
tree57270c7f90133aa44cd9486248168321ab7527d6
parentd093bc7582fc60b51b42d2edf32b3ce68cd283eb
fetch-pack: introduce negotiator API

Introduce the new files fetch-negotiator.{h,c}, which contains an API
behind which the details of negotiation are abstracted. Currently, only
one algorithm is available: the existing one.

This patch is written to be easily reviewed: static functions are
moved verbatim from fetch-pack.c to negotiator/default.c, and it can be
seen that the lines replaced by negotiator->X() calls are present in the
X() functions respectively.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
fetch-negotiator.c [new file with mode: 0644]
fetch-negotiator.h [new file with mode: 0644]
fetch-pack.c
negotiator/default.c [new file with mode: 0644]
negotiator/default.h [new file with mode: 0644]
object.h