Merge branch 'master' into sqlite

This commit is contained in:
Joey Hess 2019-11-21 17:26:50 -04:00
commit d4661959de
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
152 changed files with 2443 additions and 462 deletions

View file

@ -21,6 +21,7 @@ import qualified Git.LsTree
import qualified Git.Types
import qualified Database.Keys
import qualified Database.Keys.SQL
import Config
{- Looks up the key corresponding to an annexed file in the work tree,
- by examining what the file links to.
@ -74,7 +75,7 @@ ifAnnexed file yes no = maybe no yes =<< lookupFile file
- as-is.
-}
scanUnlockedFiles :: Annex ()
scanUnlockedFiles = whenM (inRepo Git.Ref.headExists) $ do
scanUnlockedFiles = whenM (inRepo Git.Ref.headExists <&&> not <$> isBareRepo) $ do
Database.Keys.runWriter $
liftIO . Database.Keys.SQL.dropAllAssociatedFiles
(l, cleanup) <- inRepo $ Git.LsTree.lsTree Git.LsTree.LsTreeRecursive Git.Ref.headRef