builtin/fetch: remove unique promisor remote limitation
As the infrastructure for more than one promisor remote has been introduced in previous patches, we can remove code that forbids the registration of more than one promisor remote. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder committed
Jun 25, 2019 at 15:40 UTC
5e46139376a4b8d31f02a521bdf801f3b8913e57
1 file changed
+5
-15
builtin/fetch.c
+5
-15
@@ -1465,26 +1465,16 @@ static inline void fetch_one_setup_partial(struct remote *remote)
1465
return;
1466
1467
/*
1468
- * If this is the FIRST partial-fetch request, we enable partial
1469
- * on this repo and remember the given filter-spec as the default
1470
- * for subsequent fetches to this remote.
1468
+ * If this is a partial-fetch request, we enable partial on
1469
+ * this repo if not already enabled and remember the given
1470
+ * filter-spec as the default for subsequent fetches to this
1471
+ * remote.
1472
*/
1472
- if (!has_promisor_remote() && filter_options.choice) {
1473
+ if (filter_options.choice) {
1474
partial_clone_register(remote->name, &filter_options);
1475
return;
1476
}
1477
1477
- /*
1478
- * We are currently limited to only ONE promisor remote and only
1479
- * allow partial-fetches from the promisor remote.
1480
- */
1481
- if (!promisor_remote_find(remote->name)) {
1482
- if (filter_options.choice)
1483
- die(_("--filter can only be used with the remote "
1484
- "configured in extensions.partialClone"));
1485
- return;
1486
- }
1487
-
1478
/*
1479
* Do a partial-fetch from the promisor remote using either the
1480
* explicitly given filter-spec or inherit the filter-spec from