summaryrefslogtreecommitdiff
path: root/Command/Add.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-06-05 19:51:03 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-06-05 19:51:03 -0400
commitd3cee987caf20b309334b37bd1b89e8b9115cf0a (patch)
tree8c1a244545efed3b2fd9e48ea28faac12aa326fe /Command/Add.hs
parent77188ff04d8d4d42b25daac9eeffbf10d8b663ac (diff)
separate source of content from the filename associated with the key when generating a key
This already made migrate's code a lot simpler.
Diffstat (limited to 'Command/Add.hs')
-rw-r--r--Command/Add.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Command/Add.hs b/Command/Add.hs
index ef839b2a3..7029a9c16 100644
--- a/Command/Add.hs
+++ b/Command/Add.hs
@@ -12,7 +12,7 @@ import Annex.Exception
import Command
import qualified Annex
import qualified Annex.Queue
-import qualified Backend
+import Backend
import Logs.Location
import Annex.Content
import Utility.Touch
@@ -46,8 +46,9 @@ start file = notBareRepo $ ifAnnexed file fixup add
perform :: FilePath -> CommandPerform
perform file = do
- backend <- Backend.chooseBackend file
- Backend.genKey file backend >>= go
+ let source = KeySource { keyFilename = file, contentLocation = file}
+ backend <- chooseBackend file
+ genKey source backend >>= go
where
go Nothing = stop
go (Just (key, _)) = do