diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2014-08-03 17:39:37 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2014-08-03 17:39:37 +0100 |
commit | c0fcc7499118fdba35f817ff2f8765b7a1534e2d (patch) | |
tree | 122b49dcaae1fbe6c03ce14ced441bd089d88578 /dgit | |
parent | 4fd22956f74ec637545137e7fa25b5dbf03585c0 (diff) |
Do not spew diff output to terminal (by default). Closes:#736526.
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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; } |