From ec06283844a90c3e9440286401e9ad7d86daa5ae Mon Sep 17 00:00:00 2001 From: Jonathan Tan Date: Thu, 14 Jun 2018 15:54:28 -0700 Subject: 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 Signed-off-by: Junio C Hamano --- fetch-negotiator.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 fetch-negotiator.c (limited to 'fetch-negotiator.c') diff --git a/fetch-negotiator.c b/fetch-negotiator.c new file mode 100644 index 0000000000..2675d120fe --- /dev/null +++ b/fetch-negotiator.c @@ -0,0 +1,8 @@ +#include "git-compat-util.h" +#include "fetch-negotiator.h" +#include "negotiator/default.h" + +void fetch_negotiator_init(struct fetch_negotiator *negotiator) +{ + default_negotiator_init(negotiator); +} -- cgit v1.2.3