Staging
v0.5.1
Revision 9206d27eb5e76bbb3a4e59e3c53f92eaa0caa97b authored by Jonathan Nieder on 19 April 2020, 23:30:08 UTC, committed by Jonathan Nieder on 19 April 2020, 23:30:08 UTC
This merges up the security fix from v2.17.5.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2 parent s fe22686 + 041bc65
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