diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-12-26 13:59:27 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-12-26 13:59:27 -0400 |
commit | 483abf98b1949b88c3e96c987378be23f8ed869a (patch) | |
tree | bc3e75200ea69bf837ccd08a266ca4528efde09b /Remote/Helper | |
parent | 274dbabd972da62e4480bc09fa62bbcdf6f72e6f (diff) |
add unlocked flag for git-annex-shell recvkey
The direct flag is also set when sending unlocked content, to support old
versions of git-annex-shell. At some point, the direct flag will be
removed, and only the unlocked flag will be used.
Diffstat (limited to 'Remote/Helper')
-rw-r--r-- | Remote/Helper/Ssh.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Remote/Helper/Ssh.hs b/Remote/Helper/Ssh.hs index 0442ce839..1545fa21d 100644 --- a/Remote/Helper/Ssh.hs +++ b/Remote/Helper/Ssh.hs @@ -126,10 +126,13 @@ rsyncHelper m params = do {- Generates rsync parameters that ssh to the remote and asks it - to either receive or send the key's content. -} rsyncParamsRemote :: Bool -> Remote -> Direction -> Key -> FilePath -> AssociatedFile -> Annex [CommandParam] -rsyncParamsRemote direct r direction key file afile = do +rsyncParamsRemote unlocked r direction key file afile = do u <- getUUID let fields = (Fields.remoteUUID, fromUUID u) - : (Fields.direct, if direct then "1" else "") + : (Fields.unlocked, if unlocked then "1" else "") + -- Send direct field for unlocked content, for backwards + -- compatability. + : (Fields.direct, if unlocked then "1" else "") : maybe [] (\f -> [(Fields.associatedFile, f)]) afile Just (shellcmd, shellparams) <- git_annex_shell (repo r) (if direction == Download then "sendkey" else "recvkey") |