summaryrefslogtreecommitdiff
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
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.
-rw-r--r--Backend.hs6
-rw-r--r--debian/changelog2
2 files changed, 6 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
diff --git a/debian/changelog b/debian/changelog
index 1709f6346..b433ec62f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,8 @@ git-annex (0.03) UNRELEASED; urgency=low
* Added remote.annex-scp-options and remote.annex-ssh-options.
* The backends to use when adding different sets of files can be configured
via gitattributes.
+ * In .gitattributes, the git-annex-backend attribute can be set to the
+ names of backends to use when adding different types of files.
-- Joey Hess <joeyh@debian.org> Thu, 28 Oct 2010 13:46:59 -0400