diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2017-12-08 15:27:16 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-12-08 17:52:42 (GMT) |
commit | 0c16cd499dee09b7fc6dd10cb6a476e96c147ef6 (patch) | |
tree | 782bff532cd6dc373c26979de66eb9abbf872b6a /builtin/gc.c | |
parent | df11e1964825b825e179ccdbc1b9e3a6fc09e67a (diff) | |
download | git-0c16cd499dee09b7fc6dd10cb6a476e96c147ef6.zip git-0c16cd499dee09b7fc6dd10cb6a476e96c147ef6.tar.gz git-0c16cd499dee09b7fc6dd10cb6a476e96c147ef6.tar.bz2 |
gc: do not repack promisor packfiles
Teach gc to stop traversal at promisor objects, and to leave promisor
packfiles alone. This has the effect of only repacking non-promisor
packfiles, and preserves the distinction between promisor packfiles and
non-promisor packfiles.
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/gc.c')
-rw-r--r-- | builtin/gc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/gc.c b/builtin/gc.c index 3c5eae0..77fa720 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -458,6 +458,9 @@ int cmd_gc(int argc, const char **argv, const char *prefix) argv_array_push(&prune, prune_expire); if (quiet) argv_array_push(&prune, "--no-progress"); + if (repository_format_partial_clone) + argv_array_push(&prune, + "--exclude-promisor-objects"); if (run_command_v_opt(prune.argv, RUN_GIT_CMD)) return error(FAILED_RUN, prune.argv[0]); } |