git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] remote.c - Make remote definition require a url

From
Mark Levedahl <mlevedahl@gmail.com>
Date
Oct 11, 2014, 15:20 UTC
Message-ID
<1413040849-20056-1-git-send-email-mlevedahl@gmail.com>

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
Next: Junio C Hamano
Message 1 of 3 in “remote.c - Make remote definition require a url”
  1. remote.c - Make remote definition require a urlMark Levedahl, Oct 11, 2014
  2. Junio C HamanoOct 13, 2014
  3. Mark LevedahlOct 14, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.