diff options
author | Joey Hess <joey@kitenet.net> | 2011-06-21 16:08:09 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-06-21 16:08:09 -0400 |
commit | 7e7428f173ba1b72b4de69fd482f44161ee84420 (patch) | |
tree | 7db187ad39b67905fb0de179c74fcd48ff603663 /Branch.hs | |
parent | a5e6802b5b6f9354e065936998d9882e8ceecb5b (diff) |
refactor
Diffstat (limited to 'Branch.hs')
-rw-r--r-- | Branch.hs | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -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. -} |