diff options
authorIan Jackson <>2018-07-31 13:37:39 +0100
committerIan Jackson <>2018-07-31 13:38:19 +0100
commitcd06cd0cf3b1190fde3862684a18a1d7d56a834e (patch)
parente5d430e4208757b874443779b75ca884a143aa6a (diff)
git-debrebase: Improve error message for convert-from-gbp upstream discrepancy
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 <>
2 files changed, 8 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index dc87466..3948db7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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.
diff --git a/git-debrebase b/git-debrebase
index 439a10a..13ca472 100755
--- a/git-debrebase
+++ b/git-debrebase
@@ -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 :/
if (!is_fast_fwd $upstream, $old_head) {