summaryrefslogtreecommitdiff
path: root/Command/Unused.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-03-07 12:43:56 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-03-07 12:43:56 -0400
commit2356a2557a65073bc61fc909a5806615129114d3 (patch)
treecb2460b15957628834403bb4f1c30c903dbf09e8 /Command/Unused.hs
parent657f2518895dd055f083140ff644c144cbe72305 (diff)
Fix direct mode getKeysPresent false positive & also sped up direct mode unused and unannex
unused: In direct mode, files that are deleted from the work tree are no longer incorrectly detected as unused. Direct mode `git annex info` slows down a bit due to more stringent checking, but not by a lot.
Diffstat (limited to 'Command/Unused.hs')
-rw-r--r--Command/Unused.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Command/Unused.hs b/Command/Unused.hs
index 6b4475568..c174cd256 100644
--- a/Command/Unused.hs
+++ b/Command/Unused.hs
@@ -71,7 +71,9 @@ checkUnused = chain 0
return []
findunused False = do
showAction "checking for unused data"
- excludeReferenced =<< getKeysPresent
+ -- InAnnex, not InRepository because if a direct mode
+ -- file exists, it is obviously not unused.
+ excludeReferenced =<< getKeysPresent InAnnex
chain _ [] = next $ return True
chain v (a:as) = do
v' <- a v