optimiation
avoids reading the config of a local remote twice in a row
This commit is contained in:
parent
2332afb4bc
commit
c7e65bbb12
1 changed files with 3 additions and 3 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue