From: Elijah Newren Date: Sun, 03 Oct 2010 19:37:11 GMT Subject: Re: [PATCHv5 07/16] t3600 (rm): add lots of missing && Message-ID: In-Reply-To: <20101003142855.GC17084@burratino> On Sun, Oct 3, 2010 at 8:28 AM, Jonathan Nieder wrote: >> --- a/t/t3600-rm.sh >> +++ b/t/t3600-rm.sh >> @@ -38,37 +38,33 @@ test_expect_success \ > [...] >>  test_expect_success \ >>      'Test that git rm --cached foo fails if the index matches neither the file nor HEAD' ' >> -     echo content > foo >> -     git add foo >> -     git commit -m foo >> +     git checkout HEAD -- foo && > [...] > > Why not > >        -       echo content > foo >        -       git add foo >        -       git commit -m foo >        +       echo content > foo && >        +       git add foo && >        +       git commit --allow-empty -m foo && > > ? What advantage does using these three commands have over 'git checkout HEAD -- foo'? Perhaps I'm missing something, but I don't see it. It's three commands to one, and the tests don't depend on foo starting with contents of 'content'; just that foo matches HEAD to start. However, I'm fine with this alternative as well, if others prefer it.