separate source of content from the filename associated with the key when generating a key
This already made migrate's code a lot simpler.
This commit is contained in:
parent
77188ff04d
commit
d3cee987ca
9 changed files with 59 additions and 57 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue