diff options
author | 2017-10-16 14:10:03 -0400 | |
---|---|---|
committer | 2017-10-16 14:10:20 -0400 | |
commit | 95697161487c5df3d8a88cdccbc40fd0c4d7b094 (patch) | |
tree | 7fb5769ee098ddafb445e587f550a22c4f1f49c9 /Command/Unannex.hs | |
parent | fb899e75cf1ac84f3fd61ea39288811bacddee2c (diff) |
Avoid repeated checking that files passed on the command line exist.
git annex add, git annex lock etc make multiple seek passes,
and each seek pass checked that files existed. That was unncessary
redundant work.
Fixed by adding a new WorkTreeItem type, make seek actions use it,
and check that the files exist when constructing it.
This commit was supported by the NSF-funded DataLad project.
Diffstat (limited to 'Command/Unannex.hs')
-rw-r--r-- | Command/Unannex.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Command/Unannex.hs b/Command/Unannex.hs index e3e8d51ab..7c693a088 100644 --- a/Command/Unannex.hs +++ b/Command/Unannex.hs @@ -30,7 +30,8 @@ cmd = withGlobalOptions annexedMatchingOptions $ paramPaths (withParams seek) seek :: CmdParams -> CommandSeek -seek = wrapUnannex . (withFilesInGit $ whenAnnexed start) +seek ps = wrapUnannex $ + (withFilesInGit $ whenAnnexed start) =<< workTreeItems ps wrapUnannex :: Annex a -> Annex a wrapUnannex a = ifM (versionSupportsUnlockedPointers <||> isDirect) |