summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit10
1 files changed, 9 insertions, 1 deletions
diff --git a/dgit b/dgit
index 940c89b..b3a4e9b 100755
--- a/dgit
+++ b/dgit
@@ -707,7 +707,15 @@ sub pull () {
}
sub check_not_dirty () {
- runcmd @git, qw(diff --quiet HEAD);
+ my @cmd = (@git, qw(diff --quiet HEAD));
+ printcmd(\*DEBUG,"+",@cmd) if $debug>0;
+ $!=0; $?=0; system @cmd;
+ return if !$! && !$?;
+ if (!$! && $?==256) {
+ fail "working tree is dirty (does not match HEAD)";
+ } else {
+ failedcmd @cmd;
+ }
}
sub commit_quilty_patch ($) {