remove the older move --force, which never behaved as documented and seems useless
* move: --force was accidentially enabling two unrelated behaviors since 6.20180427. The older behavior, which has never been well documented and seems almost entirely useless, has been removed. * copy: --force no longer does anything. This commit was sponsored by Øyvind Andersen Holm.
This commit is contained in:
parent
ca6f5be284
commit
2fabd7cdb5
5 changed files with 41 additions and 19 deletions
|
@ -186,15 +186,13 @@ fromStart removewhen afile key ai src = case removewhen of
|
|||
next $ fromPerform src removewhen key afile
|
||||
|
||||
fromOk :: Remote -> Key -> Annex Bool
|
||||
fromOk src key = go =<< Annex.getState Annex.force
|
||||
fromOk src key
|
||||
| Remote.hasKeyCheap src =
|
||||
either (const checklog) return =<< haskey
|
||||
| otherwise = checklog
|
||||
where
|
||||
go True = either (const $ return True) return =<< haskey
|
||||
go False
|
||||
| Remote.hasKeyCheap src =
|
||||
either (const expensive) return =<< haskey
|
||||
| otherwise = expensive
|
||||
haskey = Remote.hasKey src key
|
||||
expensive = do
|
||||
checklog = do
|
||||
u <- getUUID
|
||||
remotes <- Remote.keyPossibilities key
|
||||
return $ u /= Remote.uuid src && elem src remotes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue