Skip to content

Commit cdb92b9

Browse files
derrickstoleedscho
authored andcommitted
fetch: reprepare packs before checking connectivity
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
1 parent f394d2c commit cdb92b9

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎builtin/fetch.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "transport.h"
2424
#include "gvfs.h"
2525
#include "gvfs-helper-client.h"
26+
#include "packfile.h"
2627
#include "run-command.h"
2728
#include "parse-options.h"
2829
#include "sigchain.h"
@@ -1122,6 +1123,13 @@ static int store_updated_refs(struct display_state *display_state,
11221123

11231124
opt.exclude_hidden_refs_section = "fetch";
11241125
rm = ref_map;
1126+
1127+
/*
1128+
* Before checking connectivity, be really sure we have the
1129+
* latest pack-files loaded into memory.
1130+
*/
1131+
odb_reprepare(the_repository->objects);
1132+
11251133
if (check_connected(iterate_ref_map, &rm, &opt)) {
11261134
rc = error(_("%s did not send all necessary objects"),
11271135
display_state->url);

0 commit comments

Comments
 (0)