From 9f6b7d6258d9c8c7acfeabbb54661505b935eae3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 18 Feb 2019 17:27:34 -0400 Subject: [PATCH] On Windows, avoid using rsync for file-to-file copies, since rsync is not always available there. Installing git-annex with stack rsync won't be available. Also, using the git-annex installer with 64 bit git installs a non-working rsync binary because it's linked with libraries provided by 32 bit git. --- CHANGELOG | 2 ++ Remote/Git.hs | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 34cb40c7b9..d24174eefc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -31,6 +31,8 @@ git-annex (7.20190130) UNRELEASED; urgency=medium filesystem, that left the repository in indirect mode. * Fix path separator bug on Windows that completely broke git-annex since version 7.20190122. + * On Windows, avoid using rsync for file-to-file copies, since rsync is not + always available there. -- Joey Hess Wed, 30 Jan 2019 12:30:22 -0400 diff --git a/Remote/Git.hs b/Remote/Git.hs index 7641dc50ab..6fc41d2166 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -709,7 +709,9 @@ onLocalFast repo r a = onLocal repo r $ Annex.BranchState.disableUpdate >> a rsyncOrCopyFile :: [CommandParam] -> FilePath -> FilePath -> MeterUpdate -> Annex Bool rsyncOrCopyFile rsyncparams src dest p = #ifdef mingw32_HOST_OS - dorsync + -- rsync is only available on Windows in some inatallation methods, + -- and is not strictly needed here, so don't use it. + docopy where #else ifM (sameDeviceIds src dest) (docopy, dorsync)