]> git.ipfire.org Git - thirdparty/git.git/blame - fetch-negotiator.c
Merge branch 'rj/add-i-leak-fix'
[thirdparty/git.git] / fetch-negotiator.c
CommitLineData
ec062838
JT
1#include "git-compat-util.h"
2#include "fetch-negotiator.h"
3#include "negotiator/default.h"
42cc7485 4#include "negotiator/skipping.h"
cbe566a0 5#include "negotiator/noop.h"
aaf633c2 6#include "repository.h"
ec062838 7
aaf633c2
DS
8void fetch_negotiator_init(struct repository *r,
9 struct fetch_negotiator *negotiator)
ec062838 10{
aaf633c2
DS
11 prepare_repo_settings(r);
12 switch(r->settings.fetch_negotiation_algorithm) {
13 case FETCH_NEGOTIATION_SKIPPING:
14 skipping_negotiator_init(negotiator);
15 return;
16
cbe566a0
JT
17 case FETCH_NEGOTIATION_NOOP:
18 noop_negotiator_init(negotiator);
19 return;
20
714edc62 21 case FETCH_NEGOTIATION_CONSECUTIVE:
aaf633c2
DS
22 default_negotiator_init(negotiator);
23 return;
42cc7485 24 }
ec062838 25}
18368365
RC
26
27void fetch_negotiator_init_noop(struct fetch_negotiator *negotiator)
28{
29 noop_negotiator_init(negotiator);
30}