optimise initialized check

Avoid running external command if annex.version is set.
This commit is contained in:
Joey Hess 2011-08-17 18:38:26 -04:00
parent 228a724d1d
commit b7a4ff1c31
4 changed files with 21 additions and 23 deletions

View file

@ -81,7 +81,7 @@ tryGitConfigRead r
| Git.repoIsHttp r = store $ safely $ geturlconfig
| Git.repoIsUrl r = return r
| otherwise = store $ safely $ do
onLocal r initializeSafe
onLocal r ensureInitialized
Git.configRead r
where
-- Reading config can fail due to IO error or