From eb6cb1b87f2d7016ddd4386e2a3bb20d8ea3c036 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 18 May 2012 18:20:53 -0400 Subject: Add support for core.worktree, and fix support for GIT_WORK_TREE and GIT_DIR. The environment needs to override git-config. Changed when git config is read, and avoid rereading it once it's been read. chdir for both worktree settings. --- Remote/Git.hs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'Remote') diff --git a/Remote/Git.hs b/Remote/Git.hs index 35928b96c..79439b784 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -179,12 +179,8 @@ repoAvail r - monad using that repository. -} onLocal :: Git.Repo -> Annex a -> IO a onLocal r a = do - -- Avoid re-reading the repository's configuration if it was - -- already read. - state <- if M.null $ Git.config r - then Annex.new r - else return $ Annex.newState r - Annex.eval state $ do + s <- Annex.new r + Annex.eval s $ do -- No need to update the branch; its data is not used -- for anything onLocal is used to do. Annex.BranchState.disableUpdate -- cgit v1.2.3