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>maint
							parent
							
								
									fa3d1b63e8
								
							
						
					
					
						commit
						5e46139376
					
				|  | @ -1465,26 +1465,16 @@ static inline void fetch_one_setup_partial(struct remote *remote) | |||
| 		return; | ||||
|  | ||||
| 	/* | ||||
| 	 * If this is the FIRST partial-fetch request, we enable partial | ||||
| 	 * on this repo and remember the given filter-spec as the default | ||||
| 	 * for subsequent fetches to this remote. | ||||
| 	 * If this is a partial-fetch request, we enable partial on | ||||
| 	 * this repo if not already enabled and remember the given | ||||
| 	 * filter-spec as the default for subsequent fetches to this | ||||
| 	 * remote. | ||||
| 	 */ | ||||
| 	if (!has_promisor_remote() && filter_options.choice) { | ||||
| 	if (filter_options.choice) { | ||||
| 		partial_clone_register(remote->name, &filter_options); | ||||
| 		return; | ||||
| 	} | ||||
|  | ||||
| 	/* | ||||
| 	 * We are currently limited to only ONE promisor remote and only | ||||
| 	 * allow partial-fetches from the promisor remote. | ||||
| 	 */ | ||||
| 	if (!promisor_remote_find(remote->name)) { | ||||
| 		if (filter_options.choice) | ||||
| 			die(_("--filter can only be used with the remote " | ||||
| 			      "configured in extensions.partialClone")); | ||||
| 		return; | ||||
| 	} | ||||
|  | ||||
| 	/* | ||||
| 	 * Do a partial-fetch from the promisor remote using either the | ||||
| 	 * explicitly given filter-spec or inherit the filter-spec from | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Christian Couder
						Christian Couder