{"thread":{"id":"52069","subject":"[PATCH] rebase: hide --preserve-merges option","startedAt":"2019-10-18T23:56:03Z","lastAt":"2019-10-21T03:04:24Z","messageCount":2,"participants":["Denton Liu","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"384439","messageId":"47bc4470e22c349082ae45b1e4b5c2547d30d4d2.1571442786.git.liu.denton@gmail.com","threadId":"52069","inReplyTo":null,"subject":"[PATCH] rebase: hide --preserve-merges option","fromName":"Denton Liu","fromEmail":"liu.denton@gmail.com","sentAt":"2019-10-18T23:55:56Z","receivedAt":"2019-10-18T23:56:03Z","isPatch":true,"sender":{"key":"liu.denton@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9620836?v=4"},"body":"Since --preserve-merges has been deprecated in favour of\n--rebase-merges, mark this option as hidden so it no longer shows up in\nthe usage and completions.\n\nSigned-off-by: Denton Liu <liu.denton@gmail.com>\n---\nThis patch continues the deprecation effort and can be based on top of\n`js/rebase-deprecate-preserve-merges`.\n\n builtin/rebase.c | 7 ++++---\n 1 file changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/builtin/rebase.c b/builtin/rebase.c\nindex 21ac10f739..0d63651d95 100644\n--- a/builtin/rebase.c\n+++ b/builtin/rebase.c\n@@ -1099,9 +1099,10 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)\n \t\t\tN_(\"let the user edit the list of commits to rebase\"),\n \t\t\tPARSE_OPT_NOARG | PARSE_OPT_NONEG,\n \t\t\tparse_opt_interactive },\n-\t\tOPT_SET_INT('p', \"preserve-merges\", &options.type,\n-\t\t\t    N_(\"(DEPRECATED) try to recreate merges instead of \"\n-\t\t\t       \"ignoring them\"), REBASE_PRESERVE_MERGES),\n+\t\tOPT_SET_INT_F('p', \"preserve-merges\", &options.type,\n+\t\t\t      N_(\"(DEPRECATED) try to recreate merges instead of \"\n+\t\t\t\t \"ignoring them\"),\n+\t\t\t      REBASE_PRESERVE_MERGES, PARSE_OPT_HIDDEN),\n \t\tOPT_BOOL(0, \"rerere-autoupdate\",\n \t\t\t &options.allow_rerere_autoupdate,\n \t\t\t N_(\"allow rerere to update index with resolved \"\n-- \n2.23.0\n\n"},{"id":"384488","messageId":"xmqq36fmn6j5.fsf@gitster-ct.c.googlers.com","threadId":"52069","inReplyTo":"47bc4470e22c349082ae45b1e4b5c2547d30d4d2.1571442786.git.liu.denton@gmail.com","subject":"Re: [PATCH] rebase: hide --preserve-merges option","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-10-21T03:04:14Z","receivedAt":"2019-10-21T03:04:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Denton Liu <liu.denton@gmail.com> writes:\n\n> Since --preserve-merges has been deprecated in favour of\n> --rebase-merges, mark this option as hidden so it no longer shows up in\n> the usage and completions.\n>\n> Signed-off-by: Denton Liu <liu.denton@gmail.com>\n> ---\n> This patch continues the deprecation effort and can be based on top of\n> `js/rebase-deprecate-preserve-merges`.\n\nSounds good.  Let's keep it and have it part of the first batch\nafter the release.\n\n>\n>  builtin/rebase.c | 7 ++++---\n>  1 file changed, 4 insertions(+), 3 deletions(-)\n>\n> diff --git a/builtin/rebase.c b/builtin/rebase.c\n> index 21ac10f739..0d63651d95 100644\n> --- a/builtin/rebase.c\n> +++ b/builtin/rebase.c\n> @@ -1099,9 +1099,10 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)\n>  \t\t\tN_(\"let the user edit the list of commits to rebase\"),\n>  \t\t\tPARSE_OPT_NOARG | PARSE_OPT_NONEG,\n>  \t\t\tparse_opt_interactive },\n> -\t\tOPT_SET_INT('p', \"preserve-merges\", &options.type,\n> -\t\t\t    N_(\"(DEPRECATED) try to recreate merges instead of \"\n> -\t\t\t       \"ignoring them\"), REBASE_PRESERVE_MERGES),\n> +\t\tOPT_SET_INT_F('p', \"preserve-merges\", &options.type,\n> +\t\t\t      N_(\"(DEPRECATED) try to recreate merges instead of \"\n> +\t\t\t\t \"ignoring them\"),\n> +\t\t\t      REBASE_PRESERVE_MERGES, PARSE_OPT_HIDDEN),\n>  \t\tOPT_BOOL(0, \"rerere-autoupdate\",\n>  \t\t\t &options.allow_rerere_autoupdate,\n>  \t\t\t N_(\"allow rerere to update index with resolved \"\n"}]}