diff options
| author | Junio C Hamano <gitster@pobox.com> | 2018-08-17 13:09:55 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-08-17 13:09:55 -0700 |
| commit | 28dbabb5e04d0d2bc714c46f24dfbf102089c15b (patch) | |
| tree | 8aeebb44d9d14177a512e7b73532bb00865c3362 /fetch-negotiator.c | |
| parent | Merge branch 'jt/refspec-dwim-precedence-fix' (diff) | |
| parent | fetch doc: cross-link two new negotiation options (diff) | |
| download | git-28dbabb5e04d0d2bc714c46f24dfbf102089c15b.tar.gz git-28dbabb5e04d0d2bc714c46f24dfbf102089c15b.zip | |
Merge branch 'ab/fetch-nego'
Update to a few other topics around 'git fetch'.
* ab/fetch-nego:
fetch doc: cross-link two new negotiation options
negotiator: unknown fetch.negotiationAlgorithm should error out
Diffstat (limited to 'fetch-negotiator.c')
| -rw-r--r-- | fetch-negotiator.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/fetch-negotiator.c b/fetch-negotiator.c index 5d283049f4..d6d685cba0 100644 --- a/fetch-negotiator.c +++ b/fetch-negotiator.c @@ -6,9 +6,15 @@ void fetch_negotiator_init(struct fetch_negotiator *negotiator, const char *algorithm) { - if (algorithm && !strcmp(algorithm, "skipping")) { - skipping_negotiator_init(negotiator); - return; + 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); } |
