Skip to content

Commit 514990f

Browse files
derrickstoleedscho
authored andcommitted
fetch: reprepare packs before checking connectivity
Signed-off-by: Derrick Stolee <[email protected]>
1 parent aefd3fc commit 514990f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

builtin/fetch.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "transport.h"
2121
#include "gvfs.h"
2222
#include "gvfs-helper-client.h"
23+
#include "packfile.h"
2324
#include "run-command.h"
2425
#include "parse-options.h"
2526
#include "sigchain.h"
@@ -1159,6 +1160,13 @@ static int store_updated_refs(struct display_state *display_state,
11591160

11601161
opt.exclude_hidden_refs_section = "fetch";
11611162
rm = ref_map;
1163+
1164+
/*
1165+
* Before checking connectivity, be really sure we have the
1166+
* latest pack-files loaded into memory.
1167+
*/
1168+
reprepare_packed_git(the_repository);
1169+
11621170
if (check_connected(iterate_ref_map, &rm, &opt)) {
11631171
rc = error(_("%s did not send all necessary objects"),
11641172
display_state->url);

0 commit comments

Comments
 (0)