Thread (68 messages) 68 messages, 7 authors, 2023-03-26

Re: [PATCH v6 2/3] rebase: deprecate --rebase-merges=""

From: Phillip Wood <hidden>
Date: 2023-03-07 15:06:01

Hi Alex

On 05/03/2023 05:07, Alex Henrie wrote:
quoted hunk ↗ jump to hunk
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 6635f10d52..c36ddc0050 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -1140,7 +1140,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
  		{OPTION_STRING, 'r', "rebase-merges", &rebase_merges,
  			N_("mode"),
  			N_("try to rebase merges instead of skipping them"),
-			PARSE_OPT_OPTARG, NULL, (intptr_t)""},
+			PARSE_OPT_OPTARG, NULL, (intptr_t)"no-rebase-cousins"},
I've just realized there is a subtle behavior change here. If the user 
passes "--rebase-merges=rebase-cousins --rebase-merges" we used to 
rebase cousins but now we wont. The next patch goes back to the old 
behavior so I don't think we need to worry about it.

Best Wishes

Phillip
quoted hunk ↗ jump to hunk
  		OPT_BOOL(0, "fork-point", &options.fork_point,
  			 N_("use 'merge-base --fork-point' to refine upstream")),
  		OPT_STRING('s', "strategy", &options.strategy,
@@ -1438,7 +1438,11 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
  
  	if (rebase_merges) {
  		if (!*rebase_merges)
-			; /* default mode; do nothing */
+			warning(_("--rebase-merges with an empty string "
+				  "argument is deprecated and will stop "
+				  "working in a future version of Git. Use "
+				  "--rebase-merges without an argument "
+				  "instead, which does the same thing."));
  		else if (!strcmp("rebase-cousins", rebase_merges))
  			options.rebase_cousins = 1;
  		else if (strcmp("no-rebase-cousins", rebase_merges))
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help