report_garbage = report_pack_garbage;
reprepare_packed_git(the_repository);
- if (pack_garbage.nr > 0)
+ if (pack_garbage.nr > 0) {
+ close_all_packs(the_repository->objects);
clean_pack_garbage();
+ }
if (gc_write_commit_graph)
- write_commit_graph_reachable(get_object_directory(), 0);
+ write_commit_graph_reachable(get_object_directory(), 0,
+ !quiet && !daemonized);
if (auto_gc && too_many_loose_objects())
warning(_("There are too many unreachable loose objects; "
return ret;
if (!names.nr && !po_args.quiet)
- printf("Nothing new to pack.\n");
+ printf_ln(_("Nothing new to pack."));
+ close_all_packs(the_repository->objects);
+
/*
* Ok we have prepared all new packfiles.
* First see if there are packs of the same name and if so