summaryrefslogtreecommitdiff
path: root/Command/PreCommit.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/PreCommit.hs')
-rw-r--r--Command/PreCommit.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/Command/PreCommit.hs b/Command/PreCommit.hs
index 07d958de1..fa34ad245 100644
--- a/Command/PreCommit.hs
+++ b/Command/PreCommit.hs
@@ -13,6 +13,7 @@ import Config
import qualified Command.Add
import qualified Command.Fix
import Annex.Direct
+import Annex.Hook
import Annex.View
import Annex.View.ViewedFile
import Logs.View
@@ -28,13 +29,16 @@ def = [command "pre-commit" paramPaths seek SectionPlumbing
seek :: CommandSeek
seek ps = ifM isDirect
- -- update direct mode mappings for committed files
- ( withWords startDirect ps
+ ( do
+ -- update direct mode mappings for committed files
+ withWords startDirect ps
+ runAnnexHook preCommitAnnexHook
, do
-- fix symlinks to files being committed
withFilesToBeCommitted (whenAnnexed Command.Fix.start) ps
-- inject unlocked files into the annex
withFilesUnlockedToBeCommitted startIndirect ps
+ runAnnexHook preCommitAnnexHook
-- committing changes to a view updates metadata
mv <- currentView
case mv of
@@ -43,6 +47,7 @@ seek ps = ifM isDirect
(addViewMetaData v)
(removeViewMetaData v)
)
+
startIndirect :: FilePath -> CommandStart
startIndirect f = next $ do