Files
git/builtin
Jeff King 4543926ba8 init: reset cached config when entering new repo
After we copy the templates into place, we re-read the
config in case we copied in a default config file. But since
git_config() is backed by a cache these days, it's possible
that the call will not actually touch the filesystem at all;
we need to tell it that something has changed behind the
scenes.

Note that we also need to reset the shared_repository
config. At first glance, it seems like this should probably
just be folded into git_config_clear(). But unfortunately
that is not quite right. The shared repository value may
come from config, _or_ it may have been set manually. So
only the caller who knows whether or not they set it is the
one who can clear it (and indeed, if you _do_ put it into
git_config_clear(), then many tests fail, as we have to
clear the config cache any time we set a new config
variable).

There are three tests here. The first two actually pass
already, though it's largely luck: they just don't happen to
actually read any config before we enter the new repo.

But the third one does fail without this patch; we look at
core.sharedrepository while creating the directory, but need
to make sure the value from the template config overrides
it.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-09-13 15:45:45 -07:00
..
2016-03-10 11:13:41 -08:00
2016-02-26 13:37:16 -08:00
2015-11-20 08:02:05 -05:00
2016-02-26 13:37:16 -08:00
2015-11-20 08:02:05 -05:00
2016-02-10 14:20:08 -08:00
2015-10-21 15:59:34 -07:00
2016-02-26 13:37:16 -08:00
2016-02-26 13:37:25 -08:00
2015-10-05 13:20:08 -07:00
2015-11-20 08:02:05 -05:00
2016-01-28 16:10:14 -08:00
2015-11-20 08:02:05 -05:00
2016-02-26 13:37:16 -08:00