From: Jeff King Date: Wed, 24 Jun 2015 07:55:14 GMT Subject: Re: [PATCH 2/2] introduce "preciousObjects" repository extension Message-ID: <20150624075514.GB827@peff.net> In-Reply-To: <1435095074.28466.74.camel@twopensource.com> On Tue, Jun 23, 2015 at 05:31:14PM -0400, David Turner wrote: > On Tue, 2015-06-23 at 06:54 -0400, Jeff King wrote: > > + mkconfig 1 preciousObjects >.git/config && > > nit: I think it's better to use git config rather than manually writing > config files. git config is more future-proof if we up switching config > backends; it's also more composable with other configs (making this test > easier to copy and manipulate), and more explicit. I would have preferred that, but it makes the tests very fragile. You are depending on "git config" running even when the current directory is not a valid git repo (and we walk up to the surround git.git directory and change the config there!). I guess we could use "git config -f .git/config", though that is partially defeating the purpose of your suggestion. I dunno. I kind of figured we would cross that bridge if and when we come to it. I imagine you are pretty sensitive to it, though, having just waded through all the tests that assume various things about .git/refs. :) -Peff