From 1c75364eacac74af82eee3e4249902a38224978a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 10 Feb 2021 13:05:35 -0400 Subject: [PATCH] fix missing call to check after hard linking This could perhaps have caused a hard link to be made when the content of the object was modified. I don't think that actually happened, because the annexed file would have to be unlocked, with annex.thin, for the object to get modified, and in that case, a hard link is not made. However, to be sure, run the check. Note that it seemed best to run the check only once, although the current implementation is fast and safe to run repeatedly. --- Remote/Git.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Remote/Git.hs b/Remote/Git.hs index 9deb67508b..0964299fa0 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -884,7 +884,10 @@ mkCopier remotewanthardlink st rsyncparams = do if remotewanthardlink || localwanthardlink then return $ \src dest p check -> ifM (liftIO (catchBoolIO (linker src dest))) - ( return (True, Verified) + ( ifM check + ( return (True, Verified) + , return (False, UnVerified) + ) , copier src dest p check ) else return copier