Skip to content

Commit 3988080

Browse files
chriscoolgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b21a55f commit 3988080

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

builtin/fetch.c

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,26 +1465,16 @@ static inline void fetch_one_setup_partial(struct remote *remote)
14651465
return;
14661466

14671467
/*
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.
14711472
*/
1472-
if (!has_promisor_remote() && filter_options.choice) {
1473+
if (filter_options.choice) {
14731474
partial_clone_register(remote->name, &filter_options);
14741475
return;
14751476
}
14761477

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-
14881478
/*
14891479
* Do a partial-fetch from the promisor remote using either the
14901480
* explicitly given filter-spec or inherit the filter-spec from

0 commit comments

Comments
 (0)