Skip to content

Commit

Permalink
fetch: reprepare packs before checking connectivity
Browse files Browse the repository at this point in the history
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
  • Loading branch information
derrickstolee authored and dscho committed Aug 8, 2023
1 parent ce24ebc commit 6a244c1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions builtin/fetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -1147,6 +1147,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);
Expand Down

0 comments on commit 6a244c1

Please sign in to comment.