Skip to content

Commit 7bbf3e3

Browse files
committed
Merge 'release-gc-repack' into HEAD
2 parents c295150 + 4a3f50d commit 7bbf3e3

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

660660
report_garbage = report_pack_garbage;
661661
reprepare_packed_git(the_repository);
662-
if (pack_garbage.nr > 0)
662+
if (pack_garbage.nr > 0) {
663+
close_all_packs(the_repository->objects);
663664
clean_pack_garbage();
665+
}
664666

665667
if (gc_write_commit_graph)
666668
write_commit_graph_reachable(get_object_directory(), 0);

builtin/repack.c

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

422+
close_all_packs(the_repository->objects);
423+
422424
/*
423425
* Ok we have prepared all new packfiles.
424426
* First see if there are packs of the same name and if so

0 commit comments

Comments
 (0)