Branch handling improvements

Support creating the branch.

Unified branch state into a single data type.

Only commit changes when the index has been changed.
This commit is contained in:
Joey Hess 2011-06-22 15:58:30 -04:00
parent d3f0106f2e
commit 8166facaef
4 changed files with 97 additions and 49 deletions

18
Types/BranchState.hs Normal file
View file

@ -0,0 +1,18 @@
{- git-annex BranchState data type
-
- Copyright 2011 Joey Hess <joey@kitenet.net>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Types.BranchState where
data BranchState = BranchState {
branchUpdated :: Bool,
branchChanged :: Bool,
cachedFile :: Maybe FilePath,
cachedContent :: String
}
startBranchState :: BranchState
startBranchState = BranchState False False Nothing ""