Skip to content

Commit be190a8

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

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

builtin/fetch.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,6 +1147,13 @@ static int store_updated_refs(struct display_state *display_state,
11471147

11481148
opt.exclude_hidden_refs_section = "fetch";
11491149
rm = ref_map;
1150+
1151+
/*
1152+
* Before checking connectivity, be really sure we have the
1153+
* latest pack-files loaded into memory.
1154+
*/
1155+
reprepare_packed_git(the_repository);
1156+
11501157
if (check_connected(iterate_ref_map, &rm, &opt)) {
11511158
rc = error(_("%s did not send all necessary objects\n"),
11521159
display_state->url);

0 commit comments

Comments
 (0)