chiark / gitweb /
git-debrebase: convert-*: Fix two broken error messages
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 1 Mar 2019 18:36:50 +0000 (18:36 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 1 Mar 2019 20:35:22 +0000 (20:35 +0000)
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>
git-debrebase

index 20e5728ec48794bad73ba21fa9ec30df2b19dc53..efb0cea4997e102d225aa896fb0ca88b1c0dbcf4 100755 (executable)
@@ -2563,7 +2563,7 @@ sub cmd_convert_from_gbp () {
        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 :/
@@ -2580,9 +2580,9 @@ END
        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?",
-               $upstream;
+               $upstream_used;
            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'";
        }
     }