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 Sep 18, 2024
1 parent a0c575e commit 0a766d8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions builtin/fetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "transport.h"
#include "gvfs.h"
#include "gvfs-helper-client.h"
#include "packfile.h"
#include "run-command.h"
#include "parse-options.h"
#include "sigchain.h"
Expand Down Expand Up @@ -1162,6 +1163,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 0a766d8

Please sign in to comment.