aboutsummaryrefslogtreecommitdiff
path: root/Branch.hs
diff options
context:
space:
mode:
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. -}