From 95697161487c5df3d8a88cdccbc40fd0c4d7b094 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 16 Oct 2017 14:10:03 -0400 Subject: 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. --- Command/Fix.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Command/Fix.hs') diff --git a/Command/Fix.hs b/Command/Fix.hs index 6ef942be8..5b8630654 100644 --- a/Command/Fix.hs +++ b/Command/Fix.hs @@ -34,7 +34,8 @@ seek ps = unlessM crippledFileSystem $ do ( return FixAll , return FixSymlinks ) - flip withFilesInGit ps $ whenAnnexed $ start fixwhat + l <- workTreeItems ps + flip withFilesInGit l $ whenAnnexed $ start fixwhat data FixWhat = FixSymlinks | FixAll -- cgit v1.2.3