path: root/builtin/clean.c
diff options
authorJeff King <>2014-07-02 18:44:30 (GMT)
committerJunio C Hamano <>2014-07-02 19:51:38 (GMT)
commit45067fc973c31953ab283f77f0f91eba9a272624 (patch)
treeaff48ea05984ad0effcea2e67cfeea8a7483d257 /builtin/clean.c
parent782735203c316041df120748e5e88c1787cdf4da (diff)
t7300: repair filesystem permissions with test_when_finished
We create a directory that cannot be removed, confirm that it cannot be removed, and then fix it like: chmod 0 foo && test_must_fail git clean -d -f && chmod 755 foo If the middle step fails but leaves the directory (e.g., the bug is that clean does not notice the failure), this pollutes the test repo with an unremovable directory. Not only does this cause further tests to fail, but it means that "rm -rf" fails on the whole trash directory, and the user has to intervene manually to even re-run the test script. We can bump the "chmod 755" recovery to a test_when_finished block to be sure that it always runs. Signed-off-by: Jeff King <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin/clean.c')
0 files changed, 0 insertions, 0 deletions