diff options
-rw-r--r-- | Utility/CopyFile.hs | 14 | ||||
-rw-r--r-- | debian/changelog | 7 |
2 files changed, 14 insertions, 7 deletions
diff --git a/Utility/CopyFile.hs b/Utility/CopyFile.hs index 01639ef2a..66b88e4f0 100644 --- a/Utility/CopyFile.hs +++ b/Utility/CopyFile.hs @@ -1,6 +1,6 @@ {- git-annex file copying - - - Copyright 2010 Joey Hess <joey@kitenet.net> + - Copyright 2010,2012 Joey Hess <joey@kitenet.net> - - Licensed under the GNU GPL version 3 or higher. -} @@ -16,10 +16,10 @@ copyFileExternal :: FilePath -> FilePath -> IO Bool copyFileExternal src dest = do whenM (doesFileExist dest) $ removeFile dest - boolSystem "cp" [params, File src, File dest] + boolSystem "cp" $ params ++ [File src, File dest] where - params - | SysConfig.cp_reflink_auto = Params "--reflink=auto" - | SysConfig.cp_a = Params "-a" - | SysConfig.cp_p = Params "-p" - | otherwise = Params "" + params = map snd $ filter fst + [ (SysConfig.cp_reflink_auto, Param "--reflink=auto") + , (SysConfig.cp_a, Param "-a") + , (SysConfig.cp_p && not SysConfig.cp_a, Param "-p") + ] diff --git a/debian/changelog b/debian/changelog index 6ebd6fabf..a4e2b8b3e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +git-annex (3.20120512) UNRELEASED; urgency=low + + * Pass -a to cp even when it supports --reflink=auto, to preserve + permissions. + + -- Joey Hess <joeyh@debian.org> Tue, 15 May 2012 14:17:49 -0400 + git-annex (3.20120511) unstable; urgency=low * Rsync special remotes can be configured with shellescape=no |