avoid pre-commit check having to do with v5 unlocked files when in v6 mode
authorJoey Hess <joeyh@joeyh.name>
Tue, 15 Dec 2015 18:09:36 +0000 (14:09 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 15 Dec 2015 18:09:36 +0000 (14:09 -0400)
Command/PreCommit.hs

index 71a9f86f8c245fe276ccae11d404cb88a34fb93f..cbf7f6e3deec0ca4a55619e108ae79c752c82410 100644 (file)
@@ -43,7 +43,7 @@ seek ps = lockPreCommitHook $ ifM isDirect
                withWords startDirect ps
                runAnnexHook preCommitAnnexHook
        , do
-               ifM (liftIO Git.haveFalseIndex)
+               ifM (not <$> versionSupportsUnlockedPointers <&&> liftIO Git.haveFalseIndex)
                        ( do
                                (fs, cleanup) <- inRepo $ Git.typeChangedStaged ps
                                whenM (anyM isOldUnlocked fs) $