check onlyActionOn in Drop
* drop -J: Avoid processing the same key twice at the same time when multiple annexes files use it. This prevents a drop of a key conflicting with another drop of the same key. This commit was sponsored by Brock Spratlen on Patreon.
This commit is contained in:
parent
370757087d
commit
c8bd5710b1
2 changed files with 3 additions and 1 deletions
|
@ -16,6 +16,8 @@ git-annex (7.20181106) UNRELEASED; urgency=medium
|
||||||
to an exporttree remote that already contains the files.
|
to an exporttree remote that already contains the files.
|
||||||
* smudge: When passed a file located outside the working tree, eg by git
|
* smudge: When passed a file located outside the working tree, eg by git
|
||||||
diff, avoid erroring out.
|
diff, avoid erroring out.
|
||||||
|
* drop -J: Avoid processing the same key twice at the same time when
|
||||||
|
multiple annexes files use it.
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Tue, 06 Nov 2018 12:44:27 -0400
|
-- Joey Hess <id@joeyh.name> Tue, 06 Nov 2018 12:44:27 -0400
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ start o file key = start' o key afile (mkActionItem afile)
|
||||||
afile = AssociatedFile (Just file)
|
afile = AssociatedFile (Just file)
|
||||||
|
|
||||||
start' :: DropOptions -> Key -> AssociatedFile -> ActionItem -> CommandStart
|
start' :: DropOptions -> Key -> AssociatedFile -> ActionItem -> CommandStart
|
||||||
start' o key afile ai = do
|
start' o key afile ai = onlyActionOn key $ do
|
||||||
from <- maybe (pure Nothing) (Just <$$> getParsed) (dropFrom o)
|
from <- maybe (pure Nothing) (Just <$$> getParsed) (dropFrom o)
|
||||||
checkDropAuto (autoMode o) from afile key $ \numcopies ->
|
checkDropAuto (autoMode o) from afile key $ \numcopies ->
|
||||||
stopUnless (want from) $
|
stopUnless (want from) $
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue