On Fri, Sep 24, 2010 at 22:22, Elijah Newren <newren@xxxxxxxxx> wrote: > FIXME: I had to modify a few of the tests to make them pass again. ÂAre my > modifications okay? ÂWould a different method be preferred? > Âtest_expect_success \ > Â Â 'Test that git rm --cached foo succeeds if the index matches the file' \ > - Â Â'echo content > foo > - Â Â git add foo > - Â Â git commit -m foo > - Â Â echo "other content" > foo > + Â Â'echo content > foo && > + Â Â git add foo && > + Â Â git commit -m foo && > + Â Â echo "other content" > foo && > Â Â Âgit rm --cached foo' > > Â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 > - Â Â echo "other content" > foo > - Â Â git add foo > - Â Â echo "yet another content" > foo > + Â Â git checkout HEAD -- foo && > + Â Â echo "other content" > foo && > + Â Â git add foo && > + Â Â echo "yet another content" > foo && > Â Â Âtest_must_fail git rm --cached foo > Â' Shouldn't that be: test_when_finished "git checkout HEAD -- foo" && git rm --cached foo In the above test? Then you don't have to clean up after someone else's mess, and the tests are more self-contained. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html