move: --safe/--unsafe and potential drop race fix

move: Added --safe option, which makes move honor numcopies settings.
Also --unsafe enables the default behavior, anticipating that the
default may one day change.

This commit was sponsored by Ethan Aubin.
This commit is contained in:
Joey Hess 2018-04-09 16:09:00 -04:00
parent ae530f043e
commit af8546990d
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
11 changed files with 187 additions and 74 deletions

View file

@ -667,7 +667,7 @@ syncFile ebloom rs af k = onlyActionOn' k $ do
, return []
)
put dest = includeCommandAction $
Command.Move.toStart' dest False af k (mkActionItem af)
Command.Move.toStart' dest Command.Move.RemoveNever af k (mkActionItem af)
{- When a remote has an export-tracking branch, change the export to
- follow the current content of the branch. Otherwise, transfer any files