From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-5.4 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id DEFDF20A17 for ; Thu, 19 Jan 2017 21:44:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752494AbdASVo2 (ORCPT ); Thu, 19 Jan 2017 16:44:28 -0500 Received: from mout.gmx.net ([212.227.15.18]:57252 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752446AbdASVo0 (ORCPT ); Thu, 19 Jan 2017 16:44:26 -0500 Received: from virtualbox ([37.24.141.236]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MRWzQ-1cwyG71qEy-00Sj46; Thu, 19 Jan 2017 22:44:15 +0100 Date: Thu, 19 Jan 2017 22:44:13 +0100 (CET) From: Johannes Schindelin X-X-Sender: virtualbox@virtualbox To: Jeff King cc: git@vger.kernel.org, Junio C Hamano , Thomas Gummerer , Andrew Arnott Subject: Re: [PATCH v2 2/2] Be more careful when determining whether a remote was configured In-Reply-To: <20170119213100.g72ml7r2khu7bvey@sigill.intra.peff.net> Message-ID: References: <1605031b76025f4bd0e485705c34a25557bb75a1.1484860744.git.johannes.schindelin@gmx.de> <20170119213100.g72ml7r2khu7bvey@sigill.intra.peff.net> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US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PEhRFDst3EqrwRSObZv6GkglS+Co26tc OF+RH/+ Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Peff, On Thu, 19 Jan 2017, Jeff King wrote: > diff --git a/builtin/fetch.c b/builtin/fetch.c > index c85f3471d..9024cfffa 100644 > --- a/builtin/fetch.c > +++ b/builtin/fetch.c > @@ -1014,9 +1014,9 @@ static int add_remote_or_group(const char *name, struct string_list *list) > git_config(get_remote_group, &g); > if (list->nr == prev_nr) { > struct remote *remote; > - if (!remote_is_configured(name)) > - return 0; > remote = remote_get(name); > + if (!remote->fetch_refspec_nr) > + return 0; Please note that it is legitimate to fetch from foreign vcs, in which case the fetch refspecs may not be required (or even make sense). > It's outside the scope of your patches, so I think we are OK to just > ignore it. But if you want to pursue it, it avoids having to add the > extra parameter to remote_is_configured(). Sure, it would avoid that. But that parameter makes semantic sense: some callers may want to have all remotes, even those configured via the command-line, and others really are only interested in knowing whether the current repository config already has settings for a remote of the given name. > > Many thanks to Jeff King whose tireless review helped with settling for > > nothing less than the current strategy. > > Just how I wanted to be immortalized in git's commit history. ;) You are welcome ;-) Ciao, Johannes