From d2a75f600d7ae35a75f071081e08693ae39105c1 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Wed, 16 Feb 2022 22:07:40 +0200 Subject: [PATCH] tickle: remove Remove the hidden 'tickle' command; it wasn't really advertised so I'm sure nobody is using it (xkcd/1172). Well, it'd need to be reworked anyway. --- mu/mu-cmd.cc | 24 ------------------------ mu/mu-config.cc | 1 - mu/mu-config.hh | 1 - mu/mu-help-strings.txt | 7 ------- 4 files changed, 33 deletions(-) diff --git a/mu/mu-cmd.cc b/mu/mu-cmd.cc index 30a076a8..6629a849 100644 --- a/mu/mu-cmd.cc +++ b/mu/mu-cmd.cc @@ -374,29 +374,6 @@ cmd_remove(Mu::Store& store, const MuConfig* opts, GError** err) return foreach_msg_file(store, opts, remove_path_func, err); } -static bool -tickle_func(Mu::Store& store, const char* path, GError** err) -{ - MuMsg* msg{mu_msg_new_from_file(path, NULL, err)}; - if (!msg) - return false; - - const auto res = mu_msg_tickle(msg, err); - g_debug("tickled %s (%s)", path, res ? "ok" : "failed"); - mu_msg_unref(msg); - - return res == TRUE; -} - -static MuError -cmd_tickle(Mu::Store& store, const MuConfig* opts, GError** err) -{ - g_return_val_if_fail(opts, MU_ERROR_INTERNAL); - g_return_val_if_fail(opts->cmd == MU_CONFIG_CMD_TICKLE, MU_ERROR_INTERNAL); - - return foreach_msg_file(store, opts, tickle_func, err); -} - struct _VData { MuMsgPartSigStatus combined_status; char* report; @@ -672,7 +649,6 @@ try { case MU_CONFIG_CMD_ADD: merr = with_writable_store(cmd_add, opts, err); break; case MU_CONFIG_CMD_REMOVE: merr = with_writable_store(cmd_remove, opts, err); break; - case MU_CONFIG_CMD_TICKLE: merr = with_writable_store(cmd_tickle, opts, err); break; case MU_CONFIG_CMD_INDEX: merr = with_writable_store(mu_cmd_index, opts, err); break; /* commands instantiate store themselves */ diff --git a/mu/mu-config.cc b/mu/mu-config.cc index 48faa392..bf93b72d 100644 --- a/mu/mu-config.cc +++ b/mu/mu-config.cc @@ -674,7 +674,6 @@ cmd_from_string(const char* str) {"remove", MU_CONFIG_CMD_REMOVE}, {"script", MU_CONFIG_CMD_SCRIPT}, {"server", MU_CONFIG_CMD_SERVER}, - {"tickle", MU_CONFIG_CMD_TICKLE}, {"verify", MU_CONFIG_CMD_VERIFY}, {"view", MU_CONFIG_CMD_VIEW}}; diff --git a/mu/mu-config.hh b/mu/mu-config.hh index 6cb94aff..23f01693 100644 --- a/mu/mu-config.hh +++ b/mu/mu-config.hh @@ -74,7 +74,6 @@ typedef enum { MU_CONFIG_CMD_REMOVE, MU_CONFIG_CMD_SCRIPT, MU_CONFIG_CMD_SERVER, - MU_CONFIG_CMD_TICKLE, MU_CONFIG_CMD_VERIFY, MU_CONFIG_CMD_VIEW, diff --git a/mu/mu-help-strings.txt b/mu/mu-help-strings.txt index a18a93af..43e5ec4a 100644 --- a/mu/mu-help-strings.txt +++ b/mu/mu-help-strings.txt @@ -189,10 +189,3 @@ mu view is the mu command for displaying e-mail message files. It works on message files and does not require the message to be indexed in the database. #END - -#BEGIN MU_CONFIG_CMD_TICKLE -#STRING -mu tickle [options] -#STRING -Give a message a new unique name. Useful for some external tools. -#END