From: David Turner Date: Tue, 01 Jul 2014 22:09:47 GMT Subject: Re: [PATCH 1/3] cache-tree: Create/update cache-tree on checkout Message-ID: <1404252587.3109.1.camel@stross> In-Reply-To: On Tue, 2014-07-01 at 14:03 -0700, Junio C Hamano wrote: > David Turner writes: > > > On Tue, 2014-07-01 at 06:16 +0200, Torsten Bögershausen wrote: > >> diff --git a/t/t0090-cache-tree.sh b/t/t0090-cache-tree.sh > >> index 6c33e28..7c60675 100755 > >> --- a/t/t0090-cache-tree.sh > >> +++ b/t/t0090-cache-tree.sh > >> @@ -85,9 +85,22 @@ test_expect_success 'reset --hard without index gives cache-tree' ' > >> test_shallow_cache_tree > >> ' > >> > >> -test_expect_failure 'checkout gives cache-tree' ' > >> +test_expect_success 'checkout gives cache-tree' ' > >> + git tag current > >> git checkout HEAD^ && > >> test_shallow_cache_tree > >> > >> The && chainis broken here. > >> Does the test now pass, because "git tag" is added ? > > > > The tag does not cause the cache-tree to be created, so git tag does not > > cause the test to pass. > > That does not explain why it is a good idea to declare success of > this test if this new "git tag current" fails here for whatever > reason (e.g. somebody updated "git tag" for a reason that is > completely unrelated to cache-tree and made it segfault without > creating the "current" tag). Indeed; that's why the latest version includes &&.