summaryrefslogtreecommitdiff
path: root/Branch.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-06-21 16:08:09 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-06-21 16:08:09 -0400
commit7e7428f173ba1b72b4de69fd482f44161ee84420 (patch)
tree7db187ad39b67905fb0de179c74fcd48ff603663 /Branch.hs
parenta5e6802b5b6f9354e065936998d9882e8ceecb5b (diff)
refactor
Diffstat (limited to 'Branch.hs')
-rw-r--r--Branch.hs14
1 files changed, 12 insertions, 2 deletions
diff --git a/Branch.hs b/Branch.hs
index db8dc23da..4b62fd645 100644
--- a/Branch.hs
+++ b/Branch.hs
@@ -1,11 +1,14 @@
-{- git-annex branch management
+{- management of the git-annex branch
-
- Copyright 2011 Joey Hess <joey@kitenet.net>
-
- Licensed under the GNU GPL version 3 or higher.
-}
-module Branch where
+module Branch (
+ update,
+ change
+) where
import Control.Monad (unless)
import Control.Monad.State (liftIO)
@@ -48,3 +51,10 @@ updateRef ref
unless (null diffs) $ do
showSideAction "merging " ++ ref ++ " into " ++ name ++ "..."
liftIO $ unionMerge g fullname ref fullname
+
+{- Stages the content of a file to be committed to the branch. -}
+change :: FilePath -> String -> Annex ()
+change file content = do
+ update
+
+{- Commits staged changes to the branch. -}