Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- main :: IO ()
- dieIfBuggyGit :: IO ()
- dieIfMergeInProgress :: IO ()
- dieIfNotInGitDir :: IO ()
- die :: [Text] -> IO a
- mitBranch :: Text -> IO ()
- mitCommit :: IO ()
- mitCommit_ :: IO ()
- mitCommitMerge :: IO ()
- data PushResult
- data PushNotAttemptedReason
- pushResultToSyncResult :: PushResult -> SyncResult
- mitMerge :: Text -> IO ()
- data MergeStatus = MergeStatus {
- commits :: Seq1 GitCommitInfo
- result :: MergeResult
- undos :: [Undo]
- data MergeResult
- mitMerge' :: Text -> Text -> IO (Maybe MergeStatus)
- mitSync :: IO ()
- mitSyncWith :: Maybe [Undo] -> IO ()
- mitUndo :: IO ()
- data Summary = Summary {}
- data Sync = Sync {
- commits :: Seq1 GitCommitInfo
- result :: SyncResult
- source :: Text
- target :: Text
- data SyncResult
- putSummary :: Summary -> IO ()
- data MitState a = MitState {}
- emptyMitState :: MitState ()
- deleteMitState :: Text -> IO ()
- parseMitState :: Text -> Maybe (MitState Text)
- readMitState :: Text -> IO (MitState ())
- writeMitState :: Text -> MitState () -> IO ()
- mitfile :: Text -> FilePath
- data Undo
- showUndos :: [Undo] -> Text
- parseUndos :: Text -> Maybe [Undo]
- applyUndos :: List1 Undo -> IO ()
Documentation
dieIfBuggyGit :: IO () Source #
dieIfMergeInProgress :: IO () Source #
dieIfNotInGitDir :: IO () Source #
mitCommit_ :: IO () Source #
mitCommitMerge :: IO () Source #
data MergeStatus Source #
MergeStatus | |
|
Instances
Seq1 GitCommitInfo ~ aplg => HasField "commits" MergeStatus aplg | |
Defined in Mit hasField :: MergeStatus -> (aplg -> MergeStatus, aplg) # | |
MergeResult ~ aplg => HasField "result" MergeStatus aplg | |
Defined in Mit hasField :: MergeStatus -> (aplg -> MergeStatus, aplg) # | |
[Undo] ~ aplg => HasField "undos" MergeStatus aplg | |
Defined in Mit hasField :: MergeStatus -> (aplg -> MergeStatus, aplg) # |
data MergeResult Source #
mitSyncWith :: Maybe [Undo] -> IO () Source #
mitSyncWith maybeUndos
Whenever recording what 'mit undo' should do after 'mit sync', if maybeUndos
is provided, we use them instead.
This is pulled into a function argument to get better undo behavior after committing a merge.
Consider:
The user runs 'mit merge foo' (with or without a clean working tree), and gets conflicts. After fixing them, she runs 'mit commit'. This may result in *additional* conflicts due to the just-stashed uncommitted changes.
But either way, internally, we would like this 'mit commit' to effectively behave as a normal commit, in the sense that we want to immediately push it upstream. That means the code would like to simply call 'mit sync' after 'git commit'!
However, if this commit could be undone (i.e. we didn't push it), we wouldn't want that 'mit sync' to *locally* compute where to undo, because it would just conclude, "oh, HEAD hasn't moved, and we didn't push, so there's nothing to undo".
Instead, we want to undo to the point before running the 'mit merge' that caused the conflicts, which were later resolved by 'mit commit'.
Sync | |
|
putSummary :: Summary -> IO () Source #
Instances
emptyMitState :: MitState () Source #
deleteMitState :: Text -> IO () Source #