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 9, 2023
1 parent 27f259d commit be190a8
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 be190a8

Please sign in to comment.