Staging
v0.5.1
https://github.com/git/git
Revision 8a0ba68f6dab2c8b1f297a0d46b710bb9af3237a authored by Junio C Hamano on 01 December 2018, 12:44:56 UTC, committed by Junio C Hamano on 01 December 2018, 12:44:56 UTC
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 15cc2da
Raw File
Tip revision: 8a0ba68f6dab2c8b1f297a0d46b710bb9af3237a authored by Junio C Hamano on 01 December 2018, 12:44:56 UTC
Git 2.20-rc2
Tip revision: 8a0ba68
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