diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2020-02-04 10:25:07 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2020-06-22 19:04:08 +0100 |
commit | 53ed7494028990bcfc7ddd778ed264ad7348624e (patch) | |
tree | 3e7af19a61bb37ccde2327dfeae1a7aafac266e6 | |
parent | a1f11a98f79b9a907a5f48e108f0c794a4a500cb (diff) |
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 <ijackson@chiark.greenend.org.uk>
-rwxr-xr-x | git-debrebase | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git-debrebase b/git-debrebase index 340a590..8f36d9d 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) ]; |