use headExists

Turns out that 7be690f326 broke the
test suite on the i386ancient builder. There, git show-ref --verify HEAD
fails with "'HEAD' - not a valid ref". Apparently git 2.1.4 didn't
support that.

headExists works there and does the same thing.
This commit is contained in:
Joey Hess 2019-08-19 11:12:19 -04:00
parent f845636e30
commit bb16a26109
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -78,7 +78,7 @@ ifAnnexed file yes no = maybe no yes =<< lookupFile file
- an annex object. If so, make the unlocked file use that content.
-}
scanUnlockedFiles :: Annex ()
scanUnlockedFiles = whenM (inRepo $ Git.Ref.exists Git.Ref.headRef) $ do
scanUnlockedFiles = whenM (inRepo Git.Ref.headExists) $ do
showSideAction "scanning for unlocked files"
Database.Keys.runWriter $
liftIO . Database.Keys.SQL.dropAllAssociatedFiles