optimisation: avoid stat call
This commit was sponsored by Paul Walmsley on Patreon.
This commit is contained in:
parent
7407a80c27
commit
fcff64f8bb
4 changed files with 20 additions and 18 deletions
|
@ -85,7 +85,7 @@ linkKey file oldkey newkey = ifM (isJust <$> isAnnexLink file)
|
|||
- and vulnerable to corruption. -}
|
||||
( getViaTmpFromDisk RetrievalAllKeysSecure DefaultVerify newkey $ \tmp -> unVerified $ do
|
||||
oldobj <- calcRepo (gitAnnexLocation oldkey)
|
||||
linkOrCopy' (return True) newkey oldobj tmp Nothing
|
||||
isJust <$> linkOrCopy' (return True) newkey oldobj tmp Nothing
|
||||
, do
|
||||
ic <- withTSDelta (liftIO . genInodeCache file)
|
||||
{- The file being rekeyed is itself an unlocked file, so if
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue