drop old config when rereading repo config

Before, the new config was merged into the old, so if eg, a remote was
renamed, it would have both the new and the old remote name.
This commit is contained in:
Joey Hess 2012-10-14 17:23:40 -04:00
parent 362e18e3fd
commit 429b77844e

View file

@ -37,7 +37,10 @@ read repo@(Repo { config = c })
{- Reads config even if it was read before. -}
reRead :: Repo -> IO Repo
reRead = read'
reRead r = read' $ r
{ config = M.empty
, fullconfig = M.empty
}
{- Cannot use pipeRead because it relies on the config having been already
- read. Instead, chdir to the repo and run git config.