git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fetch: don't try to update unfetched tracking refs
@ 2013-05-27 11:40 John Keeping
  2013-05-27 15:42 ` Jeff King
  0 siblings, 1 reply; 6+ messages in thread
From: John Keeping @ 2013-05-27 11:40 UTC (permalink / raw)
  To: git; +Cc: Jeff King, John Keeping

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

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

end of thread, other threads:[~2013-05-27 16:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-27 11:40 [PATCH] fetch: don't try to update unfetched tracking refs John Keeping
2013-05-27 15:42 ` Jeff King
2013-05-27 16:01   ` John Keeping
2013-05-27 16:19     ` Jeff King
2013-05-27 16:33       ` [PATCH v2] " John Keeping
2013-05-27 16:35         ` Jeff King

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