Skip to content

Commit 13c62d6

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

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
@@ -1132,6 +1132,13 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
11321132
struct check_connected_options opt = CHECK_CONNECTED_INIT;
11331133

11341134
rm = ref_map;
1135+
1136+
/*
1137+
* Before checking connectivity, be really sure we have the
1138+
* latest pack-files loaded into memory.
1139+
*/
1140+
reprepare_packed_git(the_repository);
1141+
11351142
if (check_connected(iterate_ref_map, &rm, &opt)) {
11361143
rc = error(_("%s did not send all necessary objects\n"), url);
11371144
goto abort;

0 commit comments

Comments
 (0)