Skip to content

Commit cfe3043

Browse files
committed
fetch: reprepare packs before checking connectivity
Signed-off-by: Derrick Stolee <[email protected]>
1 parent 1a44eec commit cfe3043

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

914914
rm = ref_map;
915+
916+
/*
917+
* Before checking connectivity, be really sure we have the
918+
* latest pack-files loaded into memory.
919+
*/
920+
reprepare_packed_git(the_repository);
921+
915922
if (check_connected(iterate_ref_map, &rm, &opt)) {
916923
rc = error(_("%s did not send all necessary objects\n"), url);
917924
goto abort;

0 commit comments

Comments
 (0)