aboutsummaryrefslogtreecommitdiff
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 b3b940cdd..a15510bd9 100644
--- a/Command/PreCommit.hs
+++ b/Command/PreCommit.hs
@@ -14,9 +14,14 @@ import qualified Annex
import qualified Backend
import qualified GitRepo as Git
import qualified Command.Add
+import qualified Command.Fix
+
+{- The pre-commit hook needs to fix symlinks to all files being committed.
+ - And, it needs to inject unlocked files into the annex. -}
+seek :: [SubCmdSeek]
+seek = [withFilesToBeCommitted Command.Fix.start,
+ withUnlockedFilesToBeCommitted start]
-{- Run by git pre-commit hook; passed unlocked files that are being
- - committed. -}
start :: SubCmdStartString
start file = return $ Just $ perform file