diff options
author | John Keeping <john@keeping.me.uk> | 2013-05-27 17:33:09 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-05-28 08:13:14 -0700 |
commit | 823c6d56a83f3eec657a94581c23c5b7682bdaf4 (patch) | |
tree | 45474c59c4754cc19b203e61183c6a3982a1aa15 /builtin | |
parent | f269048754f3b835f4f7287c5a132714a059efce (diff) | |
download | git-823c6d56a83f3eec657a94581c23c5b7682bdaf4.tar.gz |
fetch: don't try to update unfetched tracking refs
Since commit f269048 (fetch: opportunistically update tracking refs,
2013-05-11) we update tracking refs opportunistically when fetching
remote branches. However, if there is a configured non-pattern refspec
that does not match any of the refspecs given on the command line then a
fatal error occurs.
Fix this by setting the "missing_ok" flag when calling get_fetch_map.
Test-added-by: Jeff King <peff@peff.net>
Signed-off-by: John Keeping <john@keeping.me.uk>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/fetch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c index e41cc0d733..d15a7343d8 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 { |