summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-11-10 10:52:43 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-11-10 10:52:43 -0400
commit91c5fe71af0f43461d933abc9a9b9a8b94594897 (patch)
tree21eb4e9d345f9ee2390a3276f9c63a0e8397711c
parentb52aa2d12f064310d193955b15ef7dccc281eec8 (diff)
add
-rw-r--r--Command/PreCommit.hs22
1 files changed, 22 insertions, 0 deletions
diff --git a/Command/PreCommit.hs b/Command/PreCommit.hs
new file mode 100644
index 000000000..2128f207d
--- /dev/null
+++ b/Command/PreCommit.hs
@@ -0,0 +1,22 @@
+{- git-annex command
+ -
+ - Copyright 2010 Joey Hess <joey@kitenet.net>
+ -
+ - Licensed under the GNU GPL version 3 or higher.
+ -}
+
+module Command.PreCommit where
+
+import Command
+import qualified Command.Fix
+
+{- Run by git pre-commit hook. -}
+start :: SubCmdStartString
+start file = do
+ -- If a file is unlocked for edit, inject its content into the
+ -- annex, and replace it with a symlink to the content. Git will
+ -- then commit that.
+ error "TODO"
+
+ -- fix symlinks
+ Command.Fix.start file