diff --git a/Annex/Locations.hs b/Annex/Locations.hs index 2aa7605310..cceeff77c8 100644 --- a/Annex/Locations.hs +++ b/Annex/Locations.hs @@ -66,7 +66,6 @@ module Annex.Locations ( gitAnnexJournalDir', gitAnnexJournalLock, gitAnnexGitQueueLock, - gitAnnexPreCommitLock, gitAnnexMergeLock, gitAnnexIndex, gitAnnexIndexStatus, @@ -469,10 +468,6 @@ gitAnnexJournalLock r = fromRawFilePath $ gitAnnexDir r P.</> "journal.lck" gitAnnexGitQueueLock :: Git.Repo -> FilePath gitAnnexGitQueueLock r = fromRawFilePath $ gitAnnexDir r P.</> "gitqueue.lck" -{- Lock file for the pre-commit hook. -} -gitAnnexPreCommitLock :: Git.Repo -> FilePath -gitAnnexPreCommitLock r = fromRawFilePath $ gitAnnexDir r P.</> "precommit.lck" - {- Lock file for direct mode merge. -} gitAnnexMergeLock :: Git.Repo -> FilePath gitAnnexMergeLock r = fromRawFilePath $ gitAnnexDir r P.</> "merge.lck" diff --git a/Command/PreCommit.hs b/Command/PreCommit.hs index ad39953e3c..eb30b15941 100644 --- a/Command/PreCommit.hs +++ b/Command/PreCommit.hs @@ -32,7 +32,7 @@ cmd = command "pre-commit" SectionPlumbing (withParams seek) seek :: CmdParams -> CommandSeek -seek ps = lockPreCommitHook $ do +seek ps = do l <- workTreeItems ps -- fix symlinks to files being committed flip withFilesToBeCommitted l $ \f -> commandAction $ @@ -74,7 +74,3 @@ showMetaDataChange = showLongNote . unlines . concatMap showmeta . fromMetaData showset v | isSet v = "+" | otherwise = "-" - -{- Takes exclusive lock; blocks until available. -} -lockPreCommitHook :: Annex a -> Annex a -lockPreCommitHook = withExclusiveLock gitAnnexPreCommitLock