diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-10-16 14:10:03 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-10-16 14:10:20 -0400 |
commit | 95697161487c5df3d8a88cdccbc40fd0c4d7b094 (patch) | |
tree | 7fb5769ee098ddafb445e587f550a22c4f1f49c9 /Command/Uninit.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/Uninit.hs')
-rw-r--r-- | Command/Uninit.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Command/Uninit.hs b/Command/Uninit.hs index af628d7a9..0445201fa 100644 --- a/Command/Uninit.hs +++ b/Command/Uninit.hs @@ -40,9 +40,10 @@ check = do seek :: CmdParams -> CommandSeek seek ps = do - withFilesNotInGit False (whenAnnexed startCheckIncomplete) ps + l <- workTreeItems ps + withFilesNotInGit False (whenAnnexed startCheckIncomplete) l Annex.changeState $ \s -> s { Annex.fast = True } - withFilesInGit (whenAnnexed Command.Unannex.start) ps + withFilesInGit (whenAnnexed Command.Unannex.start) l finish {- git annex symlinks that are not checked into git could be left by an |