Skip to content

Commit fd2862e

Browse files
committed
Merge 'release-gc-repack' into HEAD
2 parents 7df91b9 + f2fc2d7 commit fd2862e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

builtin/gc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,10 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
434434

435435
report_garbage = report_pack_garbage;
436436
reprepare_packed_git();
437-
if (pack_garbage.nr > 0)
437+
if (pack_garbage.nr > 0) {
438+
close_all_packs();
438439
clean_pack_garbage();
440+
}
439441

440442
if (auto_gc && too_many_loose_objects())
441443
warning(_("There are too many unreachable loose objects; "

builtin/repack.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,8 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
279279
if (!names.nr && !quiet)
280280
printf("Nothing new to pack.\n");
281281

282+
close_all_packs();
283+
282284
/*
283285
* Ok we have prepared all new packfiles.
284286
* First see if there are packs of the same name and if so

0 commit comments

Comments
 (0)