From: Adam Simpkins Date: Fri, 26 Feb 2010 21:59:16 GMT Subject: [PATCH] prune: honor --expire=never Message-ID: <20100226215916.GF5116@facebook.com> Previously, prune treated an expiration time of 0 to mean that no expire argument was supplied, and everything should be pruned. As a result, "prune --expire=never" would prune all unreachable objects, regardless of their timestamps. prune can be called with --expire=never automatically by gc, when the gc.pruneExpire configuration is set to "never". Signed-off-by: Adam Simpkins --- builtin-prune.c | 7 +++++-- t/t5304-prune.sh | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/builtin-prune.c b/builtin-prune.c index 4675f60..ce43271 100644 --- a/builtin-prune.c +++ b/builtin-prune.c @@ -7,6 +7,8 @@ #include "parse-options.h" #include "dir.h" +#define ALWAYS_EXPIRE ((unsigned int)-1) + static const char * const prune_usage[] = { "git prune [-n] [-v] [--expire