summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit7
1 files changed, 5 insertions, 2 deletions
diff --git a/dgit b/dgit
index 4b218a3..1fdca6c 100755
--- a/dgit
+++ b/dgit
@@ -1391,13 +1391,16 @@ sub dopush () {
$dscpath =~ m#^/# ? $dscpath : "../../../$dscpath";
my ($tree,$dir) = mktree_in_ud_from_only_subdir();
changedir '../../../..';
- my @diffcmd = (@git, qw(diff --exit-code), $tree);
+ my $diffopt = $debug>0 ? '--exit-code' : '--quiet';
+ my @diffcmd = (@git, qw(diff), $diffopt, $tree);
printcmd \*DEBUG,$debugprefix."+",@diffcmd;
$!=0; $?=0;
if (system @diffcmd) {
if ($! && $?==256) {
fail "$dscfn specifies a different tree to your HEAD commit;".
- " perhaps you forgot to build";
+ " perhaps you forgot to build".
+ ($diffopt eq '--exit-code' ? "" :
+ " (run with -D to see full diff output)");
} else {
failedcmd @diffcmd;
}