Skip to content

Commit ccec414

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

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
@@ -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"
@@ -1124,6 +1125,13 @@ static int store_updated_refs(struct display_state *display_state,
11241125

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

0 commit comments

Comments
 (0)