summaryrefslogtreecommitdiff
path: root/Git
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-14 17:23:40 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-14 17:23:40 -0400
commit32eaa8c4ccc80bfc236e6d375f8aac84651244b2 (patch)
tree601957570449937052ab060c8abf40184087a24f /Git
parente60e6c580422b17b28471ea2e420416eb12e63da (diff)
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.
Diffstat (limited to 'Git')
-rw-r--r--Git/Config.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Git/Config.hs b/Git/Config.hs
index 00d1ddba2..500c8aa0f 100644
--- a/Git/Config.hs
+++ b/Git/Config.hs
@@ -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.