diff options
author | Joey Hess <joey@kitenet.net> | 2012-07-22 13:48:50 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-07-22 14:30:43 -0400 |
commit | 4ec9244f1af85b95d014103d93de913026b20fe3 (patch) | |
tree | c2ca5dbdc4817f1078b76cd445a4fa69531e905c /Remote/Rsync.hs | |
parent | e4592649d68535ad45fe37449a90427e84734359 (diff) |
add a path field to remotes
Also broke out some helper functions around constructing remotes,
to be used later.
Diffstat (limited to 'Remote/Rsync.hs')
-rw-r--r-- | Remote/Rsync.hs | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/Remote/Rsync.hs b/Remote/Rsync.hs index ee516a8a5..1ed73e119 100644 --- a/Remote/Rsync.hs +++ b/Remote/Rsync.hs @@ -45,21 +45,24 @@ gen r u c = do return $ encryptableRemote c (storeEncrypted o) (retrieveEncrypted o) - Remote { - uuid = u, - cost = cst, - name = Git.repoDescribe r, - storeKey = store o, - retrieveKeyFile = retrieve o, - retrieveKeyFileCheap = retrieveCheap o, - removeKey = remove o, - hasKey = checkPresent r o, - hasKeyCheap = False, - whereisKey = Nothing, - config = Nothing, - repo = r, - remotetype = remote - } + Remote + { uuid = u + , cost = cst + , name = Git.repoDescribe r + , storeKey = store o + , retrieveKeyFile = retrieve o + , retrieveKeyFileCheap = retrieveCheap o + , removeKey = remove o + , hasKey = checkPresent r o + , hasKeyCheap = False + , whereisKey = Nothing + , config = Nothing + , repo = r + , path = if rsyncUrlIsPath $ rsyncUrl o + then Just $ rsyncUrl o + else Nothing + , remotetype = remote + } genRsyncOpts :: Git.Repo -> Maybe RemoteConfig -> Annex RsyncOpts genRsyncOpts r c = do |