diff options
author | Joey Hess <joey@kitenet.net> | 2011-06-22 17:08:51 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-06-22 17:08:51 -0400 |
commit | 4c4ebf2d7570030a70fdbd313b8b60e9fa727eee (patch) | |
tree | 06c632c16399245182f38f3d42b5c46d1d7a71c7 /Branch.hs | |
parent | 235e2e63a13c629dcca1aa1638f5f47a8d3983ba (diff) |
store trust.log and remote.log in the git-annex branch
.. and I think that's everything that will use the branch
Diffstat (limited to 'Branch.hs')
-rw-r--r-- | Branch.hs | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -168,15 +168,6 @@ change file content = do Param sha, File file] setCacheChanged file content -{- Commits any staged changes to the branch. -} -commit :: String -> Annex () -commit message = do - state <- getState - when (branchChanged state) $ do - g <- Annex.gitRepo - withIndex $ liftIO $ - GitUnionMerge.commit g message fullname [fullname] - {- Gets the content of a file on the branch, or content staged in the index - if it's newer. Returns an empty string if the file didn't exist yet. -} get :: FilePath -> Annex String @@ -192,3 +183,12 @@ get file = do where cat g = Git.pipeRead g [Param "cat-file", Param "blob", catfile] catfile = Param $ ':':file + +{- Commits any staged changes to the branch. -} +commit :: String -> Annex () +commit message = do + state <- getState + when (branchChanged state) $ do + g <- Annex.gitRepo + withIndex $ liftIO $ + GitUnionMerge.commit g message fullname [fullname] |