Skip to content

Commit 9e7d501

Browse files
drafnelgitster
authored andcommitted
builtin-gc.c: deprecate --prune, it now really has no effect
1 parent a37cce3 commit 9e7d501

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

builtin-gc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
219219
char buf[80];
220220

221221
struct option builtin_gc_options[] = {
222-
OPT_BOOLEAN(0, "prune", &prune, "prune unreferenced objects"),
222+
OPT_BOOLEAN(0, "prune", &prune, "prune unreferenced objects (deprecated)"),
223223
OPT_BOOLEAN(0, "aggressive", &aggressive, "be more thorough (increased runtime)"),
224224
OPT_BOOLEAN(0, "auto", &auto_gc, "enable auto-gc mode"),
225225
OPT_BOOLEAN('q', "quiet", &quiet, "suppress progress reports"),
@@ -249,7 +249,6 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
249249
/*
250250
* Auto-gc should be least intrusive as possible.
251251
*/
252-
prune = 0;
253252
if (!need_to_gc())
254253
return 0;
255254
fprintf(stderr, "Auto packing your repository for optimum "

0 commit comments

Comments
 (0)