diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/prune.c | 2 | ||||
-rw-r--r-- | builtin/repack.c | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/builtin/prune.c b/builtin/prune.c index 41230f8215..1ec9ddd751 100644 --- a/builtin/prune.c +++ b/builtin/prune.c @@ -161,7 +161,7 @@ int cmd_prune(int argc, const char **argv, const char *prefix) free(s); if (is_repository_shallow(the_repository)) - prune_shallow(show_only); + prune_shallow(show_only ? PRUNE_SHOW_ONLY : 0); return 0; } diff --git a/builtin/repack.c b/builtin/repack.c index 0223f2880c..82c19b7555 100644 --- a/builtin/repack.c +++ b/builtin/repack.c @@ -550,6 +550,12 @@ int cmd_repack(int argc, const char **argv, const char *prefix) if (!po_args.quiet && isatty(2)) opts |= PRUNE_PACKED_VERBOSE; prune_packed_objects(opts); + + if (!keep_unreachable && + (!(pack_everything & LOOSEN_UNREACHABLE) || + unpack_unreachable) && + is_repository_shallow(the_repository)) + prune_shallow(PRUNE_QUICK); } if (!no_update_server_info) |