avoid multiple unnecessary stats of the index file
Up to one per file processed.
This commit is contained in:
parent
8c87293b48
commit
5e2b4e16ba
3 changed files with 14 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue