Re: [PATCH 2/2] introduce "preciousObjects" repository extension
From: Jeff King <hidden>
Date: 2016-06-15 23:05:29
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:quoted
+ 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