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

[PATCH] fetch: don't try to update unfetched tracking refs

From
John Keeping <john@keeping.me.uk>
Date
May 27, 2013, 11:40 UTC
Message-ID
<9c6fd36368cd6b0fba4855be4d31106781c02f58.1369654825.git.john@keeping.me.uk>

Since commit f269048 (fetch: opportunistically update tracking refs, 2013-05-11) we update tracking refs opportunistically when fetching remote branches. However, if a refspec is given on the command line that does not include a configured (non-pattern) refspec a fatal error occurs.

Fix this by setting the "missing_ok" flag when calling get_fetch_map.
Signed-off-by: John Keeping <john@keeping.me.uk>
---
 builtin/fetch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/fetch.c b/builtin/fetch.c
index e41cc0d..d15a734 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -183,7 +183,7 @@ static struct ref *get_ref_map(struct transport *transport,
 		old_tail = tail;
 		for (i = 0; i < transport->remote->fetch_refspec_nr; i++)
 			get_fetch_map(ref_map, &transport->remote->fetch[i],
-				      &tail, 0);
+				      &tail, 1);
 		for (rm = *old_tail; rm; rm = rm->next)
 			rm->fetch_head_status = FETCH_HEAD_IGNORE;
 	} else {
-- 
1.8.3.rc3.438.gb3e4ae3
Next: Jeff King
Message 1 of 6 in “fetch: don't try to update unfetched tracking refs”
  1. fetch: don't try to update unfetched tracking refsJohn Keeping, May 27, 2013
  2. Jeff KingMay 27, 2013
  3. John KeepingMay 27, 2013
  4. Jeff KingMay 27, 2013
  5. fetch: don't try to update unfetched tracking refsJohn Keeping, May 27, 2013
  6. Jeff KingMay 27, 2013

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.