aboutsummaryrefslogtreecommitdiff
path: root/builtin-gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-gc.c')
-rw-r--r--builtin-gc.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/builtin-gc.c b/builtin-gc.c
index f99ebc792..48f7d95f9 100644
--- a/builtin-gc.c
+++ b/builtin-gc.c
@@ -219,7 +219,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
char buf[80];
struct option builtin_gc_options[] = {
- OPT_BOOLEAN(0, "prune", &prune, "prune unreferenced objects"),
+ OPT_BOOLEAN(0, "prune", &prune, "prune unreferenced objects (deprecated)"),
OPT_BOOLEAN(0, "aggressive", &aggressive, "be more thorough (increased runtime)"),
OPT_BOOLEAN(0, "auto", &auto_gc, "enable auto-gc mode"),
OPT_BOOLEAN('q', "quiet", &quiet, "suppress progress reports"),
@@ -249,24 +249,14 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
/*
* Auto-gc should be least intrusive as possible.
*/
- prune = 0;
if (!need_to_gc())
return 0;
fprintf(stderr, "Auto packing your repository for optimum "
"performance. You may also\n"
"run \"git gc\" manually. See "
"\"git help gc\" for more information.\n");
- } else {
- /*
- * Use safer (for shared repos) "-A" option to
- * repack when not pruning. Auto-gc makes its
- * own decision.
- */
- if (prune)
- append_option(argv_repack, "-a", MAX_ADD);
- else
- append_option(argv_repack, "-A", MAX_ADD);
- }
+ } else
+ append_option(argv_repack, "-A", MAX_ADD);
if (pack_refs && run_command_v_opt(argv_pack_refs, RUN_GIT_CMD))
return error(FAILED_RUN, argv_pack_refs[0]);