Revision ec688f776c359a2ebf1e7a05e59a5bdfd253d0a0 authored by Jean-Noël Avila on 10 August 2019, 16:12:51 UTC, committed by Jean-Noël Avila on 10 August 2019, 16:17:31 UTC
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
1 parent 466c88f
Raw File
fetch-negotiator.c
#include "git-compat-util.h"
#include "fetch-negotiator.h"
#include "negotiator/default.h"
#include "negotiator/skipping.h"

void fetch_negotiator_init(struct fetch_negotiator *negotiator,
			   const char *algorithm)
{
	if (algorithm) {
		if (!strcmp(algorithm, "skipping")) {
			skipping_negotiator_init(negotiator);
			return;
		} else if (!strcmp(algorithm, "default")) {
			/* Fall through to default initialization */
		} else {
			die("unknown fetch negotiation algorithm '%s'", algorithm);
		}
	}
	default_negotiator_init(negotiator);
}
back to top