git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Levedahl <mlevedahl@gmail.com>
To: git@vger.kernel.org
Cc: Mark Levedahl <mlevedahl@gmail.com>
Subject: [PATCH] remote.c - Make remote definition require a url
Date: Sat, 11 Oct 2014 11:20:49 -0400	[thread overview]
Message-ID: <1413040849-20056-1-git-send-email-mlevedahl@gmail.com> (raw)

Some options may be configured globally for a remote (e.g, tagopt).
The presence of such options in a global config should not cause
git remote or get fetch to believe that remote is configured
for every repository. Change to require definition of remote.<foo>.url
for the remote to be included in "git fetch --all" or "git remote
update."

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
---
 remote.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/remote.c b/remote.c
index ce785f8..1b08924 100644
--- a/remote.c
+++ b/remote.c
@@ -761,7 +761,7 @@ int for_each_remote(each_remote_fn fn, void *priv)
 	read_config();
 	for (i = 0; i < remotes_nr && !result; i++) {
 		struct remote *r = remotes[i];
-		if (!r)
+		if (!r || !r->url)
 			continue;
 		if (!r->fetch)
 			r->fetch = parse_fetch_refspec(r->fetch_refspec_nr,
-- 
2.1.2.2.0.14

             reply	other threads:[~2014-10-11 15:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-11 15:20 Mark Levedahl [this message]
2014-10-13 17:19 ` [PATCH] remote.c - Make remote definition require a url Junio C Hamano
2014-10-14  1:05   ` Mark Levedahl

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=1413040849-20056-1-git-send-email-mlevedahl@gmail.com \
    --to=mlevedahl@gmail.com \
    --cc=git@vger.kernel.org \
    /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).