diff options
author | Joey Hess <joey@kitenet.net> | 2013-03-10 21:36:13 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-03-10 22:10:26 -0400 |
commit | 9d5b42222a10050fc733a49c427359f88e8be36c (patch) | |
tree | 4fa0b1d6cf4a38ba772557dc4277fbd887020e46 /Assistant/Types | |
parent | e107ddb4507d92303e14ebee3ccdec7662350031 (diff) |
assistant: generate better commits for renames
Diffstat (limited to 'Assistant/Types')
-rw-r--r-- | Assistant/Types/Changes.hs | 3 | ||||
-rw-r--r-- | Assistant/Types/Commits.hs | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/Assistant/Types/Changes.hs b/Assistant/Types/Changes.hs index d4e1b28bc..ee797b8fe 100644 --- a/Assistant/Types/Changes.hs +++ b/Assistant/Types/Changes.hs @@ -12,6 +12,7 @@ import Types.Key import Utility.TSet import Data.Time.Clock +import Control.Concurrent.STM data ChangeInfo = AddChange Key | LinkChange (Maybe Key) | RmChange | RmDirChange deriving (Show, Eq) @@ -40,7 +41,7 @@ data Change deriving (Show) newChangeChan :: IO ChangeChan -newChangeChan = newTSet +newChangeChan = atomically newTSet isPendingAddChange :: Change -> Bool isPendingAddChange (PendingAddChange {}) = True diff --git a/Assistant/Types/Commits.hs b/Assistant/Types/Commits.hs index bb17c578b..12dab8da8 100644 --- a/Assistant/Types/Commits.hs +++ b/Assistant/Types/Commits.hs @@ -9,9 +9,11 @@ module Assistant.Types.Commits where import Utility.TSet +import Control.Concurrent.STM + type CommitChan = TSet Commit data Commit = Commit newCommitChan :: IO CommitChan -newCommitChan = newTSet +newCommitChan = atomically newTSet |