From 32eaa8c4ccc80bfc236e6d375f8aac84651244b2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 14 Oct 2012 17:23:40 -0400 Subject: 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. --- Git/Config.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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. -- cgit v1.2.3