remove a few more isDirect tests
This commit is contained in:
parent
a648c22b9b
commit
e804f48f82
2 changed files with 5 additions and 8 deletions
|
@ -55,7 +55,7 @@ lookupFileNotHidden = lookupFile' catkeyfile
|
||||||
lookupFile' :: (FilePath -> Annex (Maybe Key)) -> FilePath -> Annex (Maybe Key)
|
lookupFile' :: (FilePath -> Annex (Maybe Key)) -> FilePath -> Annex (Maybe Key)
|
||||||
lookupFile' catkeyfile file = isAnnexLink file >>= \case
|
lookupFile' catkeyfile file = isAnnexLink file >>= \case
|
||||||
Just key -> return (Just key)
|
Just key -> return (Just key)
|
||||||
Nothing -> ifM (versionSupportsUnlockedPointers <||> isDirect)
|
Nothing -> ifM versionSupportsUnlockedPointers
|
||||||
( catkeyfile file
|
( catkeyfile file
|
||||||
, return Nothing
|
, return Nothing
|
||||||
)
|
)
|
||||||
|
|
|
@ -642,7 +642,7 @@ copyToRemote' repo r st@(State connpool duc _ _) key file meterupdate
|
||||||
-- This is too broad really, but recvkey normally
|
-- This is too broad really, but recvkey normally
|
||||||
-- verifies content anyway, so avoid complicating
|
-- verifies content anyway, so avoid complicating
|
||||||
-- it with a local sendAnnex check and rollback.
|
-- it with a local sendAnnex check and rollback.
|
||||||
unlocked <- isDirect <||> versionSupportsUnlockedPointers
|
unlocked <- versionSupportsUnlockedPointers
|
||||||
oh <- mkOutputHandlerQuiet
|
oh <- mkOutputHandlerQuiet
|
||||||
Ssh.rsyncHelper oh (Just p)
|
Ssh.rsyncHelper oh (Just p)
|
||||||
=<< Ssh.rsyncParamsRemote unlocked r Upload key object file
|
=<< Ssh.rsyncParamsRemote unlocked r Upload key object file
|
||||||
|
@ -776,8 +776,6 @@ commitOnCleanup repo r a = go `after` a
|
||||||
|
|
||||||
wantHardLink :: Annex Bool
|
wantHardLink :: Annex Bool
|
||||||
wantHardLink = (annexHardLink <$> Annex.getGitConfig)
|
wantHardLink = (annexHardLink <$> Annex.getGitConfig)
|
||||||
-- Not direct mode files because they can be modified at any time.
|
|
||||||
<&&> (not <$> isDirect)
|
|
||||||
-- Not unlocked files that are hard linked in the work tree,
|
-- Not unlocked files that are hard linked in the work tree,
|
||||||
-- because they can be modified at any time.
|
-- because they can be modified at any time.
|
||||||
<&&> (not <$> annexThin <$> Annex.getGitConfig)
|
<&&> (not <$> annexThin <$> Annex.getGitConfig)
|
||||||
|
@ -801,14 +799,13 @@ mkCopier remotewanthardlink st rsyncparams = do
|
||||||
rsyncOrCopyFile st rsyncparams src dest p <&&> check
|
rsyncOrCopyFile st rsyncparams src dest p <&&> check
|
||||||
localwanthardlink <- wantHardLink
|
localwanthardlink <- wantHardLink
|
||||||
let linker = \src dest -> createLink src dest >> return True
|
let linker = \src dest -> createLink src dest >> return True
|
||||||
ifM (pure (remotewanthardlink || localwanthardlink) <&&> not <$> isDirect)
|
if remotewanthardlink || localwanthardlink
|
||||||
( return $ \src dest p check ->
|
then return $ \src dest p check ->
|
||||||
ifM (liftIO (catchBoolIO (linker src dest)))
|
ifM (liftIO (catchBoolIO (linker src dest)))
|
||||||
( return (True, Verified)
|
( return (True, Verified)
|
||||||
, copier src dest p check
|
, copier src dest p check
|
||||||
)
|
)
|
||||||
, return copier
|
else return copier
|
||||||
)
|
|
||||||
|
|
||||||
{- Normally the UUID of a local repository is checked at startup,
|
{- Normally the UUID of a local repository is checked at startup,
|
||||||
- but annex-checkuuid config can prevent that. To avoid getting
|
- but annex-checkuuid config can prevent that. To avoid getting
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue