From: Phillip Wood Date: Mon, 11 Jun 2018 15:59:20 GMT Subject: Re: [PATCH 2/2] git-rebase: error out when incompatible options passed Message-ID: <560d4128-e088-6028-9f39-5cfcb3e329b8@talktalk.net> In-Reply-To: On 11/06/18 16:19, Elijah Newren wrote: > 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. Ah you're right, I missed the hunk header > 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) That sounds like a good idea >>> -f:: >>> --force-rebase:: >>> @@ -355,13 +361,15 @@ default is `--no-fork-point`, otherwise the default >>> is `--fork-point`. >>> --whitespace=