diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2013-08-22 14:52:47 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2013-08-22 14:52:47 +0100 |
commit | f8ad84e8235e1741857849e46bcc70c2f5bc3790 (patch) | |
tree | c654d863522e8af29fc3254e1a4d42a25b605369 /dgit | |
parent | 87c98ffb9684cb31a1f6df93ca1d9e9c962e1066 (diff) |
better error msgs from check_not_dirty
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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 ($) { |