forum/"git annex get" on windows fails with rsync errorgit-annexhttp://git-annex.branchable.com/forum/__34__git_annex_get__34___on_windows_fails_with_rsync_error/git-annexikiwiki2016-01-13T16:38:43Zbump!http://git-annex.branchable.com/forum/__34__git_annex_get__34___on_windows_fails_with_rsync_error/comment_1_a1a881d7b0f0c32b1bfdd3bc5ee4dd18/sameerds2016-01-08T07:31:18Z2016-01-08T07:31:18Z
Am I the only one seeing this? <img src="http://git-annex.branchable.com/smileys/sad.png" alt=":(" />
Same herehttp://git-annex.branchable.com/forum/__34__git_annex_get__34___on_windows_fails_with_rsync_error/comment_3_50d0b68fcf0e239037a5d7950595b1d6/pkitslaar2016-01-10T07:50:14Z2016-01-10T07:50:14Z
<p>I have the same issue.</p>
<p>git-annex version: 6.20160108-ge94ef9b</p>
Possible fix for rsync windows pathshttp://git-annex.branchable.com/forum/__34__git_annex_get__34___on_windows_fails_with_rsync_error/comment_3_9bc58c6c2333655870c5e42138f9749e/pkitslaar2016-01-11T10:25:22Z2016-01-11T10:25:22Z
<p>I looked at the code that creates the paths for the rsync command on Windows.
And it is using Cygwin style paths. However, the rsync version that is bundled with
git-annex on Windows is taken from the MSYS2 distribution. This uses different path
convention for drive letters (simply <code>/c</code> and <code>/d</code> for <code>C:\</code> and <code>D:\</code> etc..)</p>
<p>I created a quick fix by adding a toMSYS2Path function and using that for rsync on Windows.
I fix can be found here: <a href="https://github.com/pkitslaar/git-annex/commit/6cd134ade1cf5b03259d04779e2767a07a2f6014">https://github.com/pkitslaar/git-annex/commit/6cd134ade1cf5b03259d04779e2767a07a2f6014</a></p>
<p>For me this works when I locally build git-annex and I can now "get" files from repositories on another drive.</p>
cygwin/msys-independent fix?http://git-annex.branchable.com/forum/__34__git_annex_get__34___on_windows_fails_with_rsync_error/comment_4_958e887dd83b8b636df2d81ade0dbbf1/sameerds2016-01-12T04:07:39Z2016-01-12T04:07:39Z
Thank you, pkitslaar, for working this out! I will try it out ASAP and provide feedback. But generally, why can we not create Windows-style paths, and then rely on the underlying platform to do the right thing? I would expect that "rsync" or any other binary will accept "C:\scratch\a" as a valid path, and then translate it appropriately for its own host such as cygwin or msys. "Clients" of these binaries should not have to worry about such things.
comment 5http://git-annex.branchable.com/forum/__34__git_annex_get__34___on_windows_fails_with_rsync_error/comment_5_24782f9b1012a2935466ac358acea97b/joey2016-01-13T16:38:43Z2016-01-13T16:29:42Z
<p>rsync thinks that "C:foo" is the file foo on host C. This makes it not
usable cross-drive on windows without some hack.</p>
<p>So, this hack broke when the bundled rsync build was changed from the cygwin
build to the msys build. I'll apply pkitslaar's patch.</p>