aboutsummaryrefslogtreecommitdiff
path: root/builtin-pack-refs.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-01-08 14:40:33 -0800
committerJunio C Hamano <junkio@cox.net>2007-01-08 14:46:00 -0800
commit0f018baba654347b5ce746253b99d59707f80184 (patch)
tree16b1f8e5488984a9cfdb8a83a261a708ec884f58 /builtin-pack-refs.c
parentd84029b6738197fa409861597934b29bbebad262 (diff)
downloadgit-0f018baba654347b5ce746253b99d59707f80184.tar.gz
git-0f018baba654347b5ce746253b99d59707f80184.tar.xz
--prune is now default for 'pack-refs'
There is no reason not to, really. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-pack-refs.c')
-rw-r--r--builtin-pack-refs.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/builtin-pack-refs.c b/builtin-pack-refs.c
index 8dc5b9eff..6de7128b9 100644
--- a/builtin-pack-refs.c
+++ b/builtin-pack-refs.c
@@ -4,7 +4,7 @@
#include "tag.h"
static const char builtin_pack_refs_usage[] =
-"git-pack-refs [--all] [--prune]";
+"git-pack-refs [--all] [--prune | --no-prune]";
struct ref_to_prune {
struct ref_to_prune *next;
@@ -90,10 +90,15 @@ int cmd_pack_refs(int argc, const char **argv, const char *prefix)
memset(&cbdata, 0, sizeof(cbdata));
+ cbdata.prune = 1;
for (i = 1; i < argc; i++) {
const char *arg = argv[i];
if (!strcmp(arg, "--prune")) {
- cbdata.prune = 1;
+ cbdata.prune = 1; /* now the default */
+ continue;
+ }
+ if (!strcmp(arg, "--no-prune")) {
+ cbdata.prune = 0;
continue;
}
if (!strcmp(arg, "--all")) {