From: Johannes Sixt Date: Fri, 09 Nov 2007 07:13:25 GMT Subject: Re: [PATCH] git-checkout: Test for relative path use. Message-ID: <47340895.6000403@viscovery.net> In-Reply-To: <11945685732608-git-send-email-dsymonds@gmail.com> David Symonds schrieb: > +test_expect_success 'remove and restore with relative path' ' > + > + cd dir1 && > + rm ../file0 && > + git checkout HEAD -- ../file0 && > + test "base" = "$(cat ../file0)" && > + rm ../dir2/file2 && > + git checkout HEAD -- ../dir2/file2 && > + test "bonjour" = "$(cat ../dir2/file2)" && > + rm ../file0 ./file1 && > + git checkout HEAD -- .. && > + test "base" = "$(cat ../file0)" && > + test "hello" = "$(cat file1)" && > + cd - What if this test fails? Then the rest of the tests run from the wrong directory. You should put the test in parenthesis (and drop the cd -). -- Hannes