Windows: Fix bug that caused git-annex sync to fail due to missing environment variable.
I think that the problem was caused by windows not having a concept of an env var that is set, but to the empty string. So, GIT_ANNEX_SSHOPTION got set to "" and was not seen as set at all. Easy fix, which also makes git-annex sync a little faster is to not set GIT_SSH, when GIT_ANNEX_SSHOPTION has no options. Might as well let git use ssh per usual in this case, no need to run git-annex as the proxy ssh command..
This commit is contained in:
parent
3cff287b26
commit
f041a65c33
3 changed files with 15 additions and 7 deletions
10
Annex/Ssh.hs
10
Annex/Ssh.hs
|
@ -266,7 +266,7 @@ inRepoWithSshOptionsTo remote gc a =
|
||||||
- to set GIT_SSH=git-annex, and sets sshOptionsEnv. -}
|
- to set GIT_SSH=git-annex, and sets sshOptionsEnv. -}
|
||||||
sshOptionsTo :: Git.Repo -> RemoteGitConfig -> Git.Repo -> Annex Git.Repo
|
sshOptionsTo :: Git.Repo -> RemoteGitConfig -> Git.Repo -> Annex Git.Repo
|
||||||
sshOptionsTo remote gc g
|
sshOptionsTo remote gc g
|
||||||
| not (Git.repoIsUrl remote) || Git.repoIsHttp remote = uncached
|
| not (Git.repoIsUrl remote) || Git.repoIsHttp remote = unchanged
|
||||||
| otherwise = case Git.Url.hostuser remote of
|
| otherwise = case Git.Url.hostuser remote of
|
||||||
Nothing -> uncached
|
Nothing -> uncached
|
||||||
Just host -> do
|
Just host -> do
|
||||||
|
@ -277,13 +277,17 @@ sshOptionsTo remote gc g
|
||||||
prepSocket sockfile
|
prepSocket sockfile
|
||||||
use (sshConnectionCachingParams sockfile)
|
use (sshConnectionCachingParams sockfile)
|
||||||
where
|
where
|
||||||
uncached = return g
|
unchanged = return g
|
||||||
|
|
||||||
use opts = do
|
use opts = do
|
||||||
let val = toSshOptionsEnv $ concat
|
let sshopts =
|
||||||
[ opts
|
[ opts
|
||||||
, map Param (remoteAnnexSshOptions gc)
|
, map Param (remoteAnnexSshOptions gc)
|
||||||
]
|
]
|
||||||
|
if null sshopts
|
||||||
|
then unchanged
|
||||||
|
else do
|
||||||
|
let val = toSshOptionsEnv (concat sshopts)
|
||||||
command <- liftIO programPath
|
command <- liftIO programPath
|
||||||
liftIO $ do
|
liftIO $ do
|
||||||
g' <- addGitEnv g sshOptionsEnv val
|
g' <- addGitEnv g sshOptionsEnv val
|
||||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -17,6 +17,8 @@ git-annex (5.20150732) UNRELEASED; urgency=medium
|
||||||
make the proxied command fail the same way.
|
make the proxied command fail the same way.
|
||||||
* proxy: Fix removal of files deleted by the proxied command.
|
* proxy: Fix removal of files deleted by the proxied command.
|
||||||
* proxy: Fix behavior when run in subdirectory of git repo.
|
* proxy: Fix behavior when run in subdirectory of git repo.
|
||||||
|
* Windows: Fix bug that caused git-annex sync to fail due to missing
|
||||||
|
environment variable.
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Fri, 31 Jul 2015 12:31:39 -0400
|
-- Joey Hess <id@joeyh.name> Fri, 31 Jul 2015 12:31:39 -0400
|
||||||
|
|
||||||
|
|
|
@ -213,3 +213,5 @@ C:\data_organization\data>
|
||||||
|
|
||||||
|
|
||||||
"""]]
|
"""]]
|
||||||
|
|
||||||
|
> [[fixed|done]] I think. --[[Joey]]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue