aboutsummaryrefslogtreecommitdiff
path: root/Backend.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-11-01 19:05:38 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-11-01 19:05:38 -0400
commit2926cc64fb838d1ddaa4b9e123a2eaec6c19cc71 (patch)
tree39c2b87a870dc9bae43d0979802d3b3cf8fed9f0 /Backend.hs
parentab3294f1dd734e7573c859e123158eda8e3551ac (diff)
In .gitattributes, the git-annex-backend attribute can be set to the names of backends to use when adding different types of files.
Diffstat (limited to 'Backend.hs')
-rw-r--r--Backend.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Backend.hs b/Backend.hs
index 693e1371b..e1d0e0a68 100644
--- a/Backend.hs
+++ b/Backend.hs
@@ -146,5 +146,7 @@ lookupFile file = do
-}
chooseBackends :: [FilePath] -> Annex [(FilePath, Maybe Backend)]
chooseBackends fs = do
- -- TODO
- return $ map (\f -> (f, Nothing)) fs
+ g <- Annex.gitRepo
+ bs <- Annex.supportedBackends
+ pairs <- liftIO $ Git.checkAttr g "git-annex-backend" fs
+ return $ map (\(f,b) -> (f, maybeLookupBackendName bs b)) pairs