summaryrefslogtreecommitdiff
path: root/git-debrebase
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2018-07-29 04:51:02 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-07-29 05:02:21 +0100
commit3028f34f1868b3726f856ede688437b5279c2b05 (patch)
tree8d8d5644820159a24753e8891c18259ab0f74bc2 /git-debrebase
parentf7559bb3b9d43f6ac272841f9bcd2620db51b7f2 (diff)
Remove // from inside conditionals
This idiom is terse, but quite confusing. Instead, handle the undef case explicitly. While we are editing these: * Change two internal errors from die to confess * Fix a die in git-debrebase which ought to be badusage Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'git-debrebase')
-rwxr-xr-xgit-debrebase3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-debrebase b/git-debrebase
index f002225..07e5f47 100755
--- a/git-debrebase
+++ b/git-debrebase
@@ -970,7 +970,8 @@ sub defaultcmd_rebase () {
}
sub cmd_analyse () {
- die if ($ARGV[0]//'') =~ m/^-/;
+ badusage "analyse does not support any options"
+ if @ARGV and $ARGV[0] =~ m/^-/;
badusage "too many arguments to analyse" if @ARGV>1;
my ($old) = @ARGV;
if (defined $old) {