diff options
Diffstat (limited to 'builtin')
| -rw-r--r-- | builtin/log.c | 19 | ||||
| -rw-r--r-- | builtin/pack-redundant.c | 10 |
2 files changed, 21 insertions, 8 deletions
diff --git a/builtin/log.c b/builtin/log.c index b450cd3bde..49cec1176a 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -113,6 +113,15 @@ struct log_config { int fmt_patch_name_max; char *fmt_pretty; char *default_date_mode; + +#ifndef WITH_BREAKING_CHANGES + /* + * Note: git_log_config() does not touch this member and that + * is very deliberate. This member is only to be used to + * resurrect whatchanged that is deprecated. + */ + int i_still_use_this; +#endif }; static void log_config_init(struct log_config *cfg) @@ -267,6 +276,10 @@ static void cmd_log_init_finish(int argc, const char **argv, const char *prefix, OPT__QUIET(&quiet, N_("suppress diff output")), OPT_BOOL(0, "source", &source, N_("show source")), OPT_BOOL(0, "use-mailmap", &mailmap, N_("use mail map file")), +#ifndef WITH_BREAKING_CHANGES + OPT_HIDDEN_BOOL(0, "i-still-use-this", &cfg->i_still_use_this, + "<use this deprecated command>"), +#endif OPT_ALIAS(0, "mailmap", "use-mailmap"), OPT_CALLBACK_F(0, "clear-decorations", NULL, NULL, N_("clear all previously-defined decoration filters"), @@ -633,6 +646,7 @@ static int git_log_config(const char *var, const char *value, return git_diff_ui_config(var, value, ctx, cb); } +#ifndef WITH_BREAKING_CHANGES int cmd_whatchanged(int argc, const char **argv, const char *prefix, @@ -656,6 +670,10 @@ int cmd_whatchanged(int argc, opt.def = "HEAD"; opt.revarg_opt = REVARG_COMMITTISH; cmd_log_init(argc, argv, prefix, &rev, &opt, &cfg); + + if (!cfg.i_still_use_this) + you_still_use_that("git whatchanged"); + if (!rev.diffopt.output_format) rev.diffopt.output_format = DIFF_FORMAT_RAW; @@ -665,6 +683,7 @@ int cmd_whatchanged(int argc, log_config_release(&cfg); return ret; } +#endif static void show_tagger(const char *buf, struct rev_info *rev) { diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c index 5d1fc78176..4138b52ccc 100644 --- a/builtin/pack-redundant.c +++ b/builtin/pack-redundant.c @@ -625,14 +625,8 @@ int cmd_pack_redundant(int argc, const char **argv, const char *prefix UNUSED, s break; } - if (!i_still_use_this) { - fputs(_("'git pack-redundant' is nominated for removal.\n" - "If you still use this command, please add an extra\n" - "option, '--i-still-use-this', on the command line\n" - "and let us know you still use it by sending an e-mail\n" - "to <git@vger.kernel.org>. Thanks.\n"), stderr); - die(_("refusing to run without --i-still-use-this")); - } + if (!i_still_use_this) + you_still_use_that("git pack-redundant"); if (load_all_packs) load_all(); |
