git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] remote.c - Make remote definition require a url
@ 2014-10-11 15:20 Mark Levedahl
  2014-10-13 17:19 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Levedahl @ 2014-10-11 15:20 UTC (permalink / raw)
  To: git; +Cc: Mark Levedahl

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-14  1:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-11 15:20 [PATCH] remote.c - Make remote definition require a url Mark Levedahl
2014-10-13 17:19 ` Junio C Hamano
2014-10-14  1:05   ` Mark Levedahl

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).