git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Johannes Schindelin <johannes.schindelin@gmx.de>,
	git@vger.kernel.org, Thomas Gummerer <t.gummerer@gmail.com>,
	Andrew Arnott <Andrew.Arnott@microsoft.com>
Subject: Re: [PATCH 2/2] Be more careful when determining whether a remote was configured
Date: Tue, 17 Jan 2017 14:19:28 -0800	[thread overview]
Message-ID: <xmqqd1flcosv.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20170117214723.p5rni6wwggei366j@sigill.intra.peff.net> (Jeff King's message of "Tue, 17 Jan 2017 16:47:23 -0500")

Jeff King <peff@peff.net> writes:

>> Let's fix this by telling Git that a remote is not configured unless any
>> fetch/push URL or refspec is configured explicitly.
>
> I notice here that setting a refspec _does_ define a remote. Is there a
> reason you drew the line there, and not at, say, whether it has a URL?

"Not configured unless any URL or refspec is configured" means that
if URL is there, even if there is no refspec, then it is a remote
definition, right?  

But I think "what does it mean to define a remote" is a question
that you are asking, and that is not necessary to answer within the
scope of this topic.

I do agree that honoring .prune is nonsense unless refspecs are
defined, but the question "does it make sense to allow prune?"  is
different from "is it configured?".  Your "you can set .proxy and
other useful things, it is just .prune does not make sense" is a
quite appropriate statement to illustrate the difference.

Perhaps instead of adding "is it configured?" flag that is too
broadly named and has too narrow meaning, would it make more sense
to introduce "int can_prune(struct remote *remote)" that looks at
the remote refspecs?

  reply	other threads:[~2017-01-17 22:21 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 [this message]
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
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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqd1flcosv.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=Andrew.Arnott@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).