diff options
author | Joey Hess <joey@kitenet.net> | 2011-06-22 15:58:30 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-06-22 15:58:30 -0400 |
commit | 8166facaef8357a6e74b1038c082bd86386c2ecd (patch) | |
tree | 0d736de3672408c964de5eaadcc6bfbac88f5096 /Types | |
parent | d3f0106f2ed15a4e4abbc09cc3e985a27dfee662 (diff) |
Branch handling improvements
Support creating the branch.
Unified branch state into a single data type.
Only commit changes when the index has been changed.
Diffstat (limited to 'Types')
-rw-r--r-- | Types/Branch.hs | 16 | ||||
-rw-r--r-- | Types/BranchState.hs | 18 |
2 files changed, 18 insertions, 16 deletions
diff --git a/Types/Branch.hs b/Types/Branch.hs deleted file mode 100644 index c0ccb5ca0..000000000 --- a/Types/Branch.hs +++ /dev/null @@ -1,16 +0,0 @@ -{- git-annex branch data types - - - - Copyright 2011 Joey Hess <joey@kitenet.net> - - - - Licensed under the GNU GPL version 3 or higher. - -} - -module Types.Branch where - -data BranchCache = BranchCache { - cachedFile :: Maybe FilePath, - cachedContent :: String -} - -emptyBranchCache :: BranchCache -emptyBranchCache = BranchCache Nothing "" diff --git a/Types/BranchState.hs b/Types/BranchState.hs new file mode 100644 index 000000000..65d0642a1 --- /dev/null +++ b/Types/BranchState.hs @@ -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 "" |