summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Miklos Vajna <vmiklos@frugalware.org>2008-02-21 02:44:46 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-02-20 20:21:39 -0800
commitaa9c83c2197cafb884face711ab7235790f9f265 (patch)
tree73af0cf70fbe2d88878b6d1e510eb9c293cc35d1 /t
parentMerge branch 'mk/color' (diff)
downloadtgif-aa9c83c2197cafb884face711ab7235790f9f265.tar.xz
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 dfd118878f..38403643a6 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