Instead of a new upstream version, the user may wish to pass -i.
(Or other git-rebase options.)
This is handled correctly when we are deciding whether to treat
further arguments as additional piece specifications, but the new
optional upstream version commitish was mishandled in this respect.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
$new_version = (new Dpkg::Version "$spec_version-1", check => 1);
}
- my $new_upstream = shift @ARGV;
+ my $new_upstream = (@ARGV && $ARGV[0] !~ m{^-}) ? shift @ARGV : undef;
my $new_upstream_version = upstreamversion $new_version;
my $new_upstream_used;
($new_upstream, $new_upstream_used) =