summaryrefslogtreecommitdiff
path: root/Annex/Branch.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-01-14 12:07:36 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-01-14 12:07:36 -0400
commit5e2b4e16ba8f6cb32461b5c09e3872ce50aa13e7 (patch)
tree2420780869a072c9c3a76d12aea887bd64c5cf04 /Annex/Branch.hs
parent8c87293b4886bd7b3389c3a3066e2c6cfa9f1a56 (diff)
avoid multiple unnecessary stats of the index file
Up to one per file processed.
Diffstat (limited to 'Annex/Branch.hs')
-rw-r--r--Annex/Branch.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Annex/Branch.hs b/Annex/Branch.hs
index a653a4995..b2b1ed3e4 100644
--- a/Annex/Branch.hs
+++ b/Annex/Branch.hs
@@ -268,7 +268,7 @@ withIndex' :: Bool -> Annex a -> Annex a
withIndex' bootstrapping a = do
f <- fromRepo gitAnnexIndex
bracketIO (Git.Index.override f) id $ do
- unlessM (liftIO $ doesFileExist f) $ do
+ checkIndexOnce $ unlessM (liftIO $ doesFileExist f) $ do
unless bootstrapping create
liftIO $ createDirectoryIfMissing True $ takeDirectory f
unless bootstrapping $ inRepo genIndex