fetch: reprepare packs before checking connectivity

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
This commit is contained in:
Derrick Stolee 2020-03-12 12:48:49 +00:00 коммит произвёл Victoria Dye
Родитель 282cd54e96
Коммит a0d5f04651
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -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);