git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Johannes Schindelin <johannes.schindelin@gmx.de>
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 0/2] Fix remote_is_configured()
Date: Tue, 17 Jan 2017 16:45:04 -0500	[thread overview]
Message-ID: <20170117214504.y7fnpkgnugbtdxpz@sigill.intra.peff.net> (raw)
In-Reply-To: <cover.1484687919.git.johannes.schindelin@gmx.de>

On Tue, Jan 17, 2017 at 10:18:58PM +0100, Johannes Schindelin wrote:

> A surprising behavior triggered the bug report in
> https://github.com/git-for-windows/git/issues/888: the mere existence of
> the config setting "remote.origin.prune" (in this instance, configured
> via ~/.gitconfig so that it applies to all repositories) fooled `git
> remote rename <source> <target>` into believing that the <target> remote
> is already there.
> 
> This patch pair demonstrates the problem, and then fixes it (along with
> potential similar problems, such as setting an HTTP proxy for remotes of
> a given name via ~/.gitconfig).

I thought it was intentional that any config "created" the remote, even
without a url field. E.g., you can set:

  [remote "https://example.com/foo/git"]
  proxy = localhost:1234

and then a bare "git fetch https://example.com/foo/git" will respect it.

I admit that "prune" is probably useless without a fetch refspec,
though.

Note that I don't disagree that the rule "it's not a remote unless it
has a url" would be a lot saner. But I have a feeling you may be
breaking some existing setups.

I grepped around in the list but I couldn't find any relevant
discussion. So maybe I just dreamed it.

-Peff

  parent reply	other threads:[~2017-01-17 21:46 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 ` Jeff King [this message]
2017-01-19 21:19 ` [PATCH v2 0/2] Fix remote_is_configured() 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

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

  git send-email \
    --in-reply-to=20170117214504.y7fnpkgnugbtdxpz@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=Andrew.Arnott@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    --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;
as well as URLs for NNTP newsgroup(s).