Skip to content

Commit 419ed64

Browse files
committed
Merge 'release-gc-repack' into HEAD
2 parents 8c03a5d + 6c0c108 commit 419ed64

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
@@ -474,8 +474,10 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
474474

475475
report_garbage = report_pack_garbage;
476476
reprepare_packed_git();
477-
if (pack_garbage.nr > 0)
477+
if (pack_garbage.nr > 0) {
478+
close_all_packs();
478479
clean_pack_garbage();
480+
}
479481

480482
if (auto_gc && too_many_loose_objects())
481483
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
@@ -304,6 +304,8 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
304304
if (!names.nr && !quiet)
305305
printf("Nothing new to pack.\n");
306306

307+
close_all_packs();
308+
307309
/*
308310
* Ok we have prepared all new packfiles.
309311
* First see if there are packs of the same name and if so

0 commit comments

Comments
 (0)