chiark / gitweb /
git-debrebase: Improve error message for convert-from-gbp upstream discrepancy
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 31 Jul 2018 12:37:39 +0000 (13:37 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 31 Jul 2018 12:38:19 +0000 (13:38 +0100)
Closes:#905078.

I don't intend to print `small' diffs because I think that kind of
dwim is probably more annoying than helpful.

I don't intend to factor this kind of pattern out throughout because:
The messages for these commands are generally not the actual diff rune
dgit or gdr ran, for various reasons (notably that dgit/gdr often use
object hashes).  The result is that there is little duplication.

So I think the situation now is OK.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
git-debrebase

index dc874663ce042f5f02c9fa6029ccd49f1c9f3221..3948db718a9501aa3ba5fda44aae2ff6d5eac9f8 100644 (file)
@@ -9,6 +9,8 @@ dgit (6.3~) unstable; urgency=medium
   * git-debrebase: convert-from-gbp: Use same algorithm for finding
     upstream commitish as new-upstream.  Closes:#905062.
   * git-debrebase: Improve error messages for bad options.
+  * git-debrebase: Improve error message for convert-from-gbp
+    upstream discrepancy.  Closes:#905078.
 
  --
 
index 439a10a75de5be17b14998314b849e64da0ab504..13ca472d47881b34361a8c4dc160bc0113d0f47c 100755 (executable)
@@ -1627,10 +1627,14 @@ sub cmd_convert_from_gbp () {
 
     my $upsdiff = get_differs $upstream, $old_head;
     if ($upsdiff & D_UPS) {
-       runcmd @git, qw(--no-pager diff),
+       runcmd @git, qw(--no-pager diff --stat),
            $upstream, $old_head,
            qw( -- :!/debian :/);
- fail "upstream ($upstream_spec) and HEAD are not identical in upstream files";
+       fail <<END;
+upstream ($upstream_spec) and HEAD are not
+identical in upstream files.  See diffstat above, or run
+  git diff $upstream_spec HEAD -- :!/debian :/
+END
     }
 
     if (!is_fast_fwd $upstream, $old_head) {