diff options
author | Joey Hess <joey@kitenet.net> | 2013-09-26 15:02:27 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-09-26 15:02:27 -0400 |
commit | a9908628a8b1d4228c4594d03eafdd451e01bfd2 (patch) | |
tree | 5b834902712bc810f8081767745719a24cdeb278 /Remote | |
parent | f32cb2cf1576db1395f77bd5f7f0c0a3e86c1334 (diff) |
support ssh://host/~/dir
When generating the path for rsync, /~/ is not valid, so change to
just host:dir
Note that git remotes specified in host:dir form are internally converted
to the ssh:// url form, so this was especially needed..
Diffstat (limited to 'Remote')
-rw-r--r-- | Remote/GCrypt.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Remote/GCrypt.hs b/Remote/GCrypt.hs index a99f2186a..fe0632943 100644 --- a/Remote/GCrypt.hs +++ b/Remote/GCrypt.hs @@ -149,8 +149,11 @@ rsyncTransport r where loc = Git.repoLocation r sshtransport (host, path) = do + let rsyncpath = if "/~/" `isPrefixOf` path + then drop 3 path + else path opts <- sshCachingOptions (host, Nothing) [] - return (rsyncShell $ Param "ssh" : opts, host ++ ":" ++ path, AccessShell) + return (rsyncShell $ Param "ssh" : opts, host ++ ":" ++ rsyncpath, AccessShell) othertransport = return ([], loc, AccessDirect) noCrypto :: Annex a |