Skip to content

Commit ef7be83

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

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"
@@ -1162,6 +1163,13 @@ static int store_updated_refs(struct display_state *display_state,
11621163

11631164
opt.exclude_hidden_refs_section = "fetch";
11641165
rm = ref_map;
1166+
1167+
/*
1168+
* Before checking connectivity, be really sure we have the
1169+
* latest pack-files loaded into memory.
1170+
*/
1171+
reprepare_packed_git(the_repository);
1172+
11651173
if (check_connected(iterate_ref_map, &rm, &opt)) {
11661174
rc = error(_("%s did not send all necessary objects"),
11671175
display_state->url);

0 commit comments

Comments
 (0)