From 53ed7494028990bcfc7ddd778ed264ad7348624e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 4 Feb 2020 10:25:07 +0000 Subject: [PATCH] git-debrebase: Fix error message for wrong use of -i Getopt::Long with "i:s" parses "-i something" as "-i" with a value of "something". Maybe I didn't know this when I wrote this code, and thought the check for $val would only reject "-isomething". But "git-rebrebase ... -i something" is wrong because it would mean "git-rebase -i something" and we do not permit the user to specify their own base. So it is right to bail out in this case. However, the message was wrong, since it refers to cuddling, and it can be caused by a non-cuddled non-option argument. Signed-off-by: Ian Jackson --- git-debrebase | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-debrebase b/git-debrebase index 340a5909..8f36d9dc 100755 --- a/git-debrebase +++ b/git-debrebase @@ -2950,7 +2950,7 @@ getoptions_main 'experimental-merge-resolution!', \$opt_merges, '-i:s' => sub { my ($opt,$val) = @_; - badusage f_ "%s: no cuddling to -i for git-rebase", $us + badusage f_ "%s: with git-debrebase, get-rebase -i option may only be followed by more options (as separate arguments)", $us if length $val; confess if $opt_defaultcmd_interactive; # should not happen $opt_defaultcmd_interactive = [ qw(-i) ]; -- 2.30.2