From f04fc3ca095f2372c9bb43ef5b884ed112d34eff Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 26 Aug 2014 17:06:43 -0700 Subject: Do not preserve permissions and acls when copying files from one local git repository to another. Timestamps are still preserved as long as cp --preserve=timestamps is supported. This avoids cp -a overriding the default mode acls that the user might have set in a git repository. With GNU cp, this behavior change should not be a breaking change, because git-anex also uses rsync sometimes in the same situation, and has only ever preserved timestamps when using rsync. Systems without GNU cp will no longer use cp -a, but instead just cp. So, timestamps will no longer be preserved. Preserving timestamps when copying between repos is not guaranteed anyway. Closes: #729757 --- Annex/Content/Direct.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Annex/Content') diff --git a/Annex/Content/Direct.hs b/Annex/Content/Direct.hs index b249e0557..d9e1535f3 100644 --- a/Annex/Content/Direct.hs +++ b/Annex/Content/Direct.hs @@ -210,7 +210,7 @@ addContentWhenNotPresent key contentfile associatedfile = do v <- isAnnexLink associatedfile when (Just key == v) $ replaceFile associatedfile $ - liftIO . void . copyFileExternal contentfile + liftIO . void . copyFileExternal CopyAllMetaData contentfile updateInodeCache key associatedfile {- Some filesystems get new inodes each time they are mounted. -- cgit v1.2.3