summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-08-30 15:16:34 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-08-30 15:16:34 -0400
commitea7b1828d48a5dce42393d252f4bbda5cba10d24 (patch)
treeb168a07b595cc90c3f45e3b3f0afa0f0365c4ea0
parentabe3b5bf783b65b2d1e071117c99fe6aa790bf0a (diff)
unused, status: Sped up by avoiding unnecessary stats of annexed files.
Statting files returned by dirContents to see if they exist and are regular files seems pretty useless. This code was originally part of fsck, and perhaps the idea then was to avoid things returned by dirContents that were not files. But it's certianly not needed in the current use cases for getKeysPresent.
-rw-r--r--Content.hs9
-rw-r--r--debian/changelog1
2 files changed, 2 insertions, 8 deletions
diff --git a/Content.hs b/Content.hs
index ba99f1330..1c2475240 100644
--- a/Content.hs
+++ b/Content.hs
@@ -254,15 +254,8 @@ getKeysPresent' dir = do
levela <- dirContents dir
levelb <- mapM dirContents levela
contents <- mapM dirContents (concat levelb)
- files <- filterM present (concat contents)
+ let files = concat contents
return $ mapMaybe (fileKey . takeFileName) files
- where
- present d = do
- result <- try $
- getFileStatus $ d </> takeFileName d
- case result of
- Right s -> return $ isRegularFile s
- Left _ -> return False
{- Things to do to record changes to content. -}
saveState :: Annex ()
diff --git a/debian/changelog b/debian/changelog
index 7803c9a62..c8c60579e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ git-annex (3.20110820) UNRELEASED; urgency=low
configured first. Closes: #638998
* The wget command will now be used in preference to curl, if available.
* init: Make description an optional parameter.
+ * unused, status: Sped up by avoiding unnecessary stats of annexed files.
-- Joey Hess <joeyh@debian.org> Tue, 23 Aug 2011 13:41:01 -0400