From: Elijah Newren Date: Mon, 11 Jun 2018 15:19:49 GMT Subject: Re: [PATCH 2/2] git-rebase: error out when incompatible options passed Message-ID: In-Reply-To: Hi Phillip On Sun, Jun 10, 2018 at 12:40 PM, Phillip Wood wrote: >> Documentation/git-rebase.txt | 15 +++++++++++++-- >> git-rebase.sh | 17 +++++++++++++++++ >> t/t3422-rebase-incompatible-options.sh | 10 +++++----- >> 3 files changed, 35 insertions(+), 7 deletions(-) >> >> diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt >> index 0e20a66e73..451252c173 100644 >> --- a/Documentation/git-rebase.txt >> +++ b/Documentation/git-rebase.txt >> @@ -243,6 +243,10 @@ leave out at most one of A and B, in which case it >> defaults to HEAD. >> --keep-empty:: >> Keep the commits that do not change anything from its >> parents in the result. >> ++ >> +This uses the `--interactive` machinery internally, and as such, >> +anything that is incompatible with --interactive is incompatible >> +with this option. >> --allow-empty-message:: >> By default, rebasing commits with an empty message will fail. >> @@ -324,6 +328,8 @@ which makes little sense. >> and after each change. When fewer lines of surrounding >> context exist they all must match. By default no context is >> ever ignored. >> + Incompatible with the --merge and --interactive options, or >> + anything that implies those options or their machinery. > > > struct replay_opts has an allow_empty_message member so I'm not sure that's > true. I think you were confused by the way the patch broke up. The jump to line 328 means that this comment is about the -C option, not the --allow-empty-message option. However, I probably should add a comment next to the --allow-empty-message option, to not the reverse is true, i.e. that it's incompatible with am-based rebases. (git-rebase--am.sh ignores the allow_empty_message variable set in git-rebase.sh, unlike git-rebase--interactive.sh and git-rebase--merge.sh) >> -f:: >> --force-rebase:: >> @@ -355,13 +361,15 @@ default is `--no-fork-point`, otherwise the default >> is `--fork-point`. >> --whitespace=