summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2008-02-21 01:44:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-02-21 04:21:39 (GMT)
commitaa9c83c2197cafb884face711ab7235790f9f265 (patch)
tree73af0cf70fbe2d88878b6d1e510eb9c293cc35d1 /t
parentb23b27eb5dc950081d4f76ae84f10168c4d149bd (diff)
downloadgit-aa9c83c2197cafb884face711ab7235790f9f265.zip
git-aa9c83c2197cafb884face711ab7235790f9f265.tar.gz
git-aa9c83c2197cafb884face711ab7235790f9f265.tar.bz2
git-clean: handle errors if removing files fails
git-clean simply ignored errors if removing a file or directory failed. This patch makes it raise a warning and the exit code also greater than zero if there are remaining files. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t7300-clean.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh
index dfd1188..3840364 100755
--- a/t/t7300-clean.sh
+++ b/t/t7300-clean.sh
@@ -316,4 +316,14 @@ test_expect_success 'core.excludesfile' '
'
+test_expect_success 'removal failure' '
+
+ mkdir foo &&
+ touch foo/bar &&
+ chmod 0 foo &&
+ ! git clean -f -d
+
+'
+chmod 755 foo
+
test_done