Staging
v0.5.1
https://github.com/git/git
Revision ab15ad1a3b4b04a29415aef8c9afa2f64fc194a2 authored by Junio C Hamano on 13 May 2019, 14:40:13 UTC, committed by Junio C Hamano on 13 May 2019, 14:50:35 UTC
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 49bc8ce
Raw File
Tip revision: ab15ad1a3b4b04a29415aef8c9afa2f64fc194a2 authored by Junio C Hamano on 13 May 2019, 14:40:13 UTC
Git 2.22-rc0
Tip revision: ab15ad1
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