From patchwork Mon Apr 1 16:40:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Couder X-Patchwork-Id: 10880283 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 74CA414DE for ; Mon, 1 Apr 2019 16:41:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 60EF728643 for ; Mon, 1 Apr 2019 16:41:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F33B28680; Mon, 1 Apr 2019 16:41:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A9AC286BF for ; Mon, 1 Apr 2019 16:41:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728701AbfDAQl0 (ORCPT ); Mon, 1 Apr 2019 12:41:26 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:33163 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728684AbfDAQl0 (ORCPT ); Mon, 1 Apr 2019 12:41:26 -0400 Received: by mail-wr1-f66.google.com with SMTP id q1so12949493wrp.0 for ; Mon, 01 Apr 2019 09:41:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1bZvtaGY+8FOPSRVBeNMEfbpzbaMtxjtD9btOaHkWdc=; b=mmVDlpAcZKubxm4KWFqXTo9YnBEEALlVcrgGlCRL5qgC+py8oB2GgXGlcXSh/6IiAC ZzlvBsrjGGc4elbBvP0P0a8ZT0kV0L1EGKSsyeBncZ+Btv2K9S+HE1xxBke0YFR5MEzM TUTy/gSUFkAM7z0zW1ZtxrxIZq8p5F+nxFW8UjCQ5a1ij3pJASGnbgQ29I8Ftp3nTJhb 3apMOThvQRlfxmDF2ExdZO6RVcdADgy/H1Y6ODki2uKfDGJQ0aT3q+uc0J/nBXpjRYY5 7LWajhYuytT4MiinlTd+sTxMmu4gwq0Y74n7F5JV2eqaRre6VA7XYSNIITV6bpWxxRyW /geQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1bZvtaGY+8FOPSRVBeNMEfbpzbaMtxjtD9btOaHkWdc=; b=ZhzRd0BOj5UOpVaHlXoGrQitenWdWhlteZ+SorYK2oWpOzq+SdInT0Bv2pMF1UCDF6 Yx/uL9isl0X8ZeHbYP5nSiEcfzz0BqmB/C1D6erLCyxeg0LHq81+wim52AeBDLR+VD7g 9bP/XhoBvy31n/ogCozG/dGd6kE9VHQs0jN0VqRWvWrAlfP1uWMJBIar0x8rDMGHInPt GTwfRUe+6jEOfBxSbhrMMiXlwfggXTibxV0NDV+y/886mDkclhMSQ0H5gRQymGc1ncao kCiAEuQNhz31uEbeUnvZ+yXZWb4jc0/EiowYyp/eDrjy7M/z5zwahSsZHNM29CfLM/xQ Tn+A== X-Gm-Message-State: APjAAAWFG9DI840K4DrKarR8aA+tJXtFGoPHbRMOsjUA5q4iwjMDVwX7 wXcRjygbycfaghTTu0DUYp98D87i X-Google-Smtp-Source: APXvYqxW8Z+w78oumIGbvAWpqE1dGKnePa4sXDHtFAhscWX30CIQ0L5CaZij4rjygCIzQj5874sF6Q== X-Received: by 2002:adf:f344:: with SMTP id e4mr40074433wrp.77.1554136884548; Mon, 01 Apr 2019 09:41:24 -0700 (PDT) Received: from localhost.localdomain ([2a04:cec0:101d:3e80:8542:d1d4:667f:a0da]) by smtp.gmail.com with ESMTPSA id s10sm11749070wmh.0.2019.04.01.09.41.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Apr 2019 09:41:23 -0700 (PDT) From: Christian Couder X-Google-Original-From: Christian Couder To: git@vger.kernel.org Cc: Junio C Hamano , Jeff King , Ben Peart , Jonathan Tan , Jonathan Nieder , Nguyen Thai Ngoc Duy , Mike Hommey , Lars Schneider , Eric Wong , Christian Couder , Jeff Hostetler , Eric Sunshine , Beat Bolli Subject: [PATCH v4 08/11] builtin/fetch: remove unique promisor remote limitation Date: Mon, 1 Apr 2019 18:40:42 +0200 Message-Id: <20190401164045.17328-9-chriscool@tuxfamily.org> X-Mailer: git-send-email 2.21.0.203.gd44fa53258 In-Reply-To: <20190401164045.17328-1-chriscool@tuxfamily.org> References: <20190401164045.17328-1-chriscool@tuxfamily.org> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- builtin/fetch.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/builtin/fetch.c b/builtin/fetch.c index 13d8133130..5657d054ec 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -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