aboutsummaryrefslogtreecommitdiff
path: root/builtin.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-05-27 18:18:47 +0700
committerJunio C Hamano <gitster@pobox.com>2013-05-28 09:20:54 -0700
commitaf0b4a3b5973ebdf8fcdedcccbc2e8ddb93c8534 (patch)
treec1a085f90321ff0e5b0e64a4262c05893e55f8c8 /builtin.h
parentedca4152560522a431a51fc0a06147fc680b5b18 (diff)
downloadgit-af0b4a3b5973ebdf8fcdedcccbc2e8ddb93c8534.tar.gz
git-af0b4a3b5973ebdf8fcdedcccbc2e8ddb93c8534.tar.xz
prune-packed: avoid implying "1" is DRY_RUN in prune_packed_objects()
Commit b60daf0 (Make git-prune-packed a bit more chatty. - 2007-01-12) changes the meaning of prune_packed_objects()'s argument, from "dry run or not dry run" to a bitmap. It however forgot to update prune_packed_objects() caller in builtin/prune.c to use new DRY_RUN macro. It's fine (for a long time!) but there is a risk that someday someone may change the value of DRY_RUN to something else and builtin/prune.c suddenly breaks. Avoid that possibility. While at there, change "opts == VERBOSE" to "opts & VERBOSE" as there is no obvious reason why we only be chatty when DRY_RUN is not set. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin.h')
-rw-r--r--builtin.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin.h b/builtin.h
index faef55913..64bab6bf5 100644
--- a/builtin.h
+++ b/builtin.h
@@ -12,6 +12,9 @@
extern const char git_usage_string[];
extern const char git_more_info_string[];
+#define PRUNE_PACKED_DRY_RUN 01
+#define PRUNE_PACKED_VERBOSE 02
+
extern void prune_packed_objects(int);
struct fmt_merge_msg_opts {