From: Ian Jackson Date: Sun, 9 Oct 2016 23:54:19 +0000 (+0100) Subject: dgit: HEAD/.dsc mismatch error: Much better message X-Git-Tag: archive/debian/2.0~28 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=7fdea3dc94e1ea2615b304a7833b951425b2357f;ds=sidebyside dgit: HEAD/.dsc mismatch error: Much better message Closes:#809516. Signed-off-by: Ian Jackson --- diff --git a/debian/changelog b/debian/changelog index 9c52188c..0dda1c7e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -49,6 +49,8 @@ dgit (1.5~~) unstable; urgency=medium Closes:#833025. * Better error message if HEAD contains changes unrepresentable by `3.0 (quilt)'. Closes:#834618. + * Much better error message when HEAD and .dsc do not match. + Closes:#809516. Infrastructure: * Better error handling in dgit-repos-policy-debian. diff --git a/dgit b/dgit index 7b16ff3f..469f6bfe 100755 --- a/dgit +++ b/dgit @@ -3211,17 +3211,20 @@ END my ($tree,$dir) = mktree_in_ud_from_only_subdir(); check_for_vendor_patches() if madformat($dsc->{format}); changedir '../../../..'; - my $diffopt = $debuglevel>0 ? '--exit-code' : '--quiet'; - my @diffcmd = (@git, qw(diff), $diffopt, $tree, $dgithead); + my @diffcmd = (@git, qw(diff --quiet), $tree, $dgithead); debugcmd "+",@diffcmd; $!=0; $?=-1; my $r = system @diffcmd; if ($r) { if ($r==256) { - fail "$dscfn specifies a different tree to your HEAD commit;". - " perhaps you forgot to build". - ($diffopt eq '--exit-code' ? "" : - " (run with -D to see full diff output)"); + my $diffs = cmdoutput @git, qw(diff --stat), $tree, $dgithead; + fail <