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 committed Aug 31, 2022
1 parent ac11a53 commit e2aaf16
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 @@ -1134,6 +1134,13 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
struct check_connected_options opt = CHECK_CONNECTED_INIT;

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"), url);
goto abort;
Expand Down

0 comments on commit e2aaf16

Please sign in to comment.