If you failed to specify the upstream version, some of the messages
would still attempt to report what you specified, causing a crash.
Closes: #922462
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
runcmd @git, qw(--no-pager diff --stat),
$upstream, $old_head,
qw( -- :!/debian :/);
runcmd @git, qw(--no-pager diff --stat),
$upstream, $old_head,
qw( -- :!/debian :/);
- fail f_ <<END, $upstream_spec, $upstream_spec;
+ fail f_ <<END, $upstream_used, $upstream;
upstream (%s) and HEAD are not
identical in upstream files. See diffstat above, or run
git diff %s HEAD -- :!/debian :/
upstream (%s) and HEAD are not
identical in upstream files. See diffstat above, or run
git diff %s HEAD -- :!/debian :/
if (length $wrong) {
snag 'unexpected-upstream-changes', f_
"history between upstream (%s) and HEAD contains direct changes to upstream files - are you sure this is a gbp (patches-unapplied) branch?",
if (length $wrong) {
snag 'unexpected-upstream-changes', f_
"history between upstream (%s) and HEAD contains direct changes to upstream files - are you sure this is a gbp (patches-unapplied) branch?",
print STDERR f_ "list expected changes with: %s\n",
print STDERR f_ "list expected changes with: %s\n",
- "git log --stat --ancestry-path $upstream_spec..HEAD -- :/ ':!/debian'";
+ "git log --stat --ancestry-path $upstream..HEAD -- :/ ':!/debian'";