From 7a8393ce7d37c5e80e8627560fa99db11058a394 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 17 Nov 2023 16:30:20 -0400 Subject: [PATCH] Fix bug in git-annex copy --from --to Caused it to skip files that were locally present. Sponsored-by: Dartmouth College's DANDI project --- CHANGELOG | 2 ++ Command/Copy.hs | 2 +- .../comment_2_e857c1d89b350517fcb9829e52d6c6db._comment | 9 +++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 doc/bugs/copy_--from_--to_does_not_copy_if_present_locally/comment_2_e857c1d89b350517fcb9829e52d6c6db._comment diff --git a/CHANGELOG b/CHANGELOG index 9761f776a1..f5f13c3f88 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -17,6 +17,8 @@ git-annex (10.20230927) UNRELEASED; urgency=medium display how the size of repositories changed over time. * log: Added options --interval, --bytes, --received, and --gnuplot to tune the output of the above added options. + * Fix bug in git-annex copy --from --to that skipped files that were + locally present. -- Joey Hess Tue, 10 Oct 2023 13:17:31 -0400 diff --git a/Command/Copy.hs b/Command/Copy.hs index 0034bb26cb..88d645a693 100644 --- a/Command/Copy.hs +++ b/Command/Copy.hs @@ -68,7 +68,7 @@ seek' o fto = startConcurrency (Command.Move.stages fto) $ do FromOrToRemote (FromRemote _) -> Just False FromOrToRemote (ToRemote _) -> Just True ToHere -> Just False - FromRemoteToRemote _ _ -> Just False + FromRemoteToRemote _ _ -> Nothing , usesLocationLog = True } keyaction = Command.Move.startKey fto Command.Move.RemoveNever diff --git a/doc/bugs/copy_--from_--to_does_not_copy_if_present_locally/comment_2_e857c1d89b350517fcb9829e52d6c6db._comment b/doc/bugs/copy_--from_--to_does_not_copy_if_present_locally/comment_2_e857c1d89b350517fcb9829e52d6c6db._comment new file mode 100644 index 0000000000..d9d1bc1602 --- /dev/null +++ b/doc/bugs/copy_--from_--to_does_not_copy_if_present_locally/comment_2_e857c1d89b350517fcb9829e52d6c6db._comment @@ -0,0 +1,9 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 2""" + date="2023-11-17T20:27:37Z" + content=""" +> So the file content being present locally prevents it sending it to the remote! + +Fixed that. +"""]]