rename changeGitConfig to overrideGitConfig and avoid unncessary calls
authorJoey Hess <joeyh@joeyh.name>
Thu, 27 Feb 2020 05:06:35 +0000 (01:06 -0400)
committerJoey Hess <joeyh@joeyh.name>
Thu, 27 Feb 2020 05:11:53 +0000 (01:11 -0400)
commitc78b9b55b6b9e2a4d4531712fab570788c5a3202
treef405a032ed0fa8f8e54afa5b2409e5a9dc535db0
parentc089f395b0c7d6416a3d4f2bf3211404acfd5b0e
rename changeGitConfig to overrideGitConfig and avoid unncessary calls

It's important that it be clear that it overrides a config, such that
reloading the git config won't change it, and in particular, setConfig
won't change it.

Most of the calls to changeGitConfig were actually after setConfig,
which was redundant and unncessary. So removed those.

The only remaining one, besides --debug, is in the handling of
repository-global config values. That one's ok, because the
way mergeGitConfig is implemented, it does not override any value that
is set in git config. If a value with a repo-global setting was passed
to setConfig, it would set it in the git config, reload the git config,
re-apply mergeGitConfig, and use the newly set value, which is the right
thing.
Annex.hs
Annex/UUID.hs
CmdLine/Option.hs
Config.hs
Config/GitConfig.hs
Upgrade/V5.hs
Upgrade/V5/Direct.hs