break depends cycle
This commit is contained in:
parent
859731ee5b
commit
d4ce072452
3 changed files with 13 additions and 3 deletions
13
Backend.hs
13
Backend.hs
|
@ -33,6 +33,19 @@ import qualified Annex
|
|||
import Utility
|
||||
import Types
|
||||
import qualified BackendTypes as B
|
||||
import BackendList
|
||||
|
||||
{- List of backends in the order to try them when storing a new key. -}
|
||||
backendList :: Annex [Backend]
|
||||
backendList = do
|
||||
l <- Annex.backends
|
||||
if (0 < length l)
|
||||
then return l
|
||||
else do
|
||||
g <- Annex.gitRepo
|
||||
let l = parseBackendList $ Git.configGet g "annex.backends" ""
|
||||
Annex.backendsChange l
|
||||
return l
|
||||
|
||||
{- Attempts to store a file in one of the backends. -}
|
||||
storeFileKey :: FilePath -> Annex (Maybe (Key, Backend))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue