From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Thomas Gummerer <t.gummerer@gmail.com>,
Andrew Arnott <Andrew.Arnott@microsoft.com>
Subject: Re: [PATCH v2 2/2] Be more careful when determining whether a remote was configured
Date: Thu, 19 Jan 2017 22:44:13 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.20.1701192241430.3469@virtualbox> (raw)
In-Reply-To: <20170119213100.g72ml7r2khu7bvey@sigill.intra.peff.net>
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
next prev parent reply other threads:[~2017-01-19 21:44 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-17 21:18 [PATCH 0/2] Fix remote_is_configured() Johannes Schindelin
2017-01-17 21:19 ` [PATCH 1/2] remote rename: demonstrate a bogus "remote exists" bug Johannes Schindelin
2017-01-17 21:19 ` [PATCH 2/2] Be more careful when determining whether a remote was configured Johannes Schindelin
2017-01-17 21:47 ` Jeff King
2017-01-17 22:19 ` Junio C Hamano
2017-01-18 12:38 ` Johannes Schindelin
2017-01-18 12:34 ` Johannes Schindelin
2017-01-18 12:54 ` Jeff King
2017-01-18 16:22 ` Johannes Schindelin
2017-01-19 18:27 ` Jeff King
2017-01-19 20:12 ` Junio C Hamano
2017-01-19 20:22 ` Jeff King
2017-01-19 21:19 ` Johannes Schindelin
2017-01-17 21:45 ` [PATCH 0/2] Fix remote_is_configured() Jeff King
2017-01-19 21:19 ` [PATCH v2 " Johannes Schindelin
2017-01-19 21:19 ` [PATCH v2 1/2] remote rename: demonstrate a bogus "remote exists" bug Johannes Schindelin
2017-01-19 21:20 ` [PATCH v2 2/2] Be more careful when determining whether a remote was configured Johannes Schindelin
2017-01-19 21:31 ` Jeff King
2017-01-19 21:44 ` Johannes Schindelin [this message]
2017-01-19 21:45 ` Junio C Hamano
2017-01-19 21:50 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.20.1701192241430.3469@virtualbox \
--to=johannes.schindelin@gmx.de \
--cc=Andrew.Arnott@microsoft.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=t.gummerer@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox