wt-status.h: drop stdio.h include
[gitweb.git] / fetch-negotiator.c
index 5d283049f4ac0a1282db16dd9d61cffd2b9a53dd..d6d685cba012d6765b3998fde14b5c40fff82a96 100644 (file)
@@ -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);
 }