diff options
author | Joey Hess <joey@kitenet.net> | 2011-12-12 02:24:37 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-12-12 02:24:37 -0400 |
commit | c7e65bbb12db3db314d809e0186db0905c677d2f (patch) | |
tree | 01d63a69d8764e053d68daf78b41e3eadc8e9a49 /Remote | |
parent | 2332afb4bc207ab04b4a1d7adfb3a2df7f5d7874 (diff) |
optimiation
avoids reading the config of a local remote twice in a row
Diffstat (limited to 'Remote')
-rw-r--r-- | Remote/Git.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs index 05743a28d..0251da558 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -86,9 +86,9 @@ tryGitConfigRead r | Git.repoIsSsh r = store $ onRemote r (pipedconfig, r) "configlist" [] | Git.repoIsHttp r = store $ safely geturlconfig | Git.repoIsUrl r = return r - | otherwise = store $ safely $ do - onLocal r ensureInitialized - Git.configRead r + | otherwise = store $ safely $ onLocal r $ do + ensureInitialized + Annex.getState Annex.repo where -- Reading config can fail due to IO error or -- for other reasons; catch all possible exceptions. |