From a0d5f04651e6303d92814cab1da7353753890659 Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Thu, 12 Mar 2020 12:48:49 +0000 Subject: [PATCH] fetch: reprepare packs before checking connectivity Signed-off-by: Derrick Stolee --- builtin/fetch.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/builtin/fetch.c b/builtin/fetch.c index 9639e375db..1f591021e1 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -1146,6 +1146,13 @@ static int store_updated_refs(struct display_state *display_state, opt.exclude_hidden_refs_section = "fetch"; rm = ref_map; + + /* + * Before checking connectivity, be really sure we have the + * latest pack-files loaded into memory. + */ + reprepare_packed_git(the_repository); + if (check_connected(iterate_ref_map, &rm, &opt)) { rc = error(_("%s did not send all necessary objects\n"), display_state->url);