Re: [PATCHv5 15/16] Add missing &&'s throughout the testsuite
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 3, 2010, 23:34 UTC
- Message-ID
- <7v62xietqc.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <AANLkTin3vtqGJDC4hrmKpFZ6e+Sw5OP15QPjO16cxgkx@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 24 quoted lines
> On Sun, Oct 3, 2010 at 8:46 AM, Jonathan Nieder <jrnieder@gmail.com> wrote: >>> --- a/t/t1509-root-worktree.sh >>> +++ b/t/t1509-root-worktree.sh >>> @@ -232,8 +232,8 @@ say "auto bare gitdir" >>> >>> # DESTROYYYYY!!!!! >>> test_expect_success 'setup' ' >>> - rm -rf /refs /objects /info /hooks >>> - rm /* >>> + rm -rf /refs /objects /info /hooks && >>> + rm /* && >> >> I'm worried that this would fail: >> >> $ mkdir foo >> $ cd foo >> $ >bar >> $ mkdir baz >> $ rm * >> rm: cannot remove `baz': Is a directory >> $ echo $? >> 1 > > How about replacing the two rm commands with a simple 'rm -rf /*'?
How would "rm -rf /*" that will remove /bin/sh and /usr/bin/git among other things would possibly help? Isn't this test about having a minimum chroot with /bin, /usr populated with minimum git (and presumably shell tools) and for whatever sick reason have a bare git repository at /?