From f90d29c48dd4183174dd08f36d03e9db81636eb0 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 15 Feb 2018 18:45:17 +0000 Subject: Dgit.pm: break out git_check_unmodified from dgit We (have to) use just "git" rather than @git, but this is OK I think. Signed-off-by: Ian Jackson --- dgit | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'dgit') diff --git a/dgit b/dgit index 573f39a..17e4fad 100755 --- a/dgit +++ b/dgit @@ -3692,15 +3692,7 @@ sub check_not_dirty () { return if $ignoredirty; - my @cmd = (@git, qw(diff --quiet HEAD)); - debugcmd "+",@cmd; - $!=0; $?=-1; system @cmd; - return if !$?; - if ($?==256) { - fail "working tree is dirty (does not match HEAD)"; - } else { - failedcmd @cmd; - } + git_check_unmodified(); } sub commit_admin ($) { -- cgit v1.2.3