mit-3qvpPyAi6mH-4: A git wrapper with a streamlined UX
Safe HaskellNone
LanguageHaskell2010

Mit

Synopsis

Documentation

main :: IO () Source #

die :: [Text] -> IO a Source #

data MergeStatus Source #

Constructors

MergeStatus 

Instances

Instances details
Seq1 GitCommitInfo ~ aplg => HasField "commits" MergeStatus aplg 
Instance details

Defined in Mit

Methods

hasField :: MergeStatus -> (aplg -> MergeStatus, aplg) #

MergeResult ~ aplg => HasField "result" MergeStatus aplg 
Instance details

Defined in Mit

Methods

hasField :: MergeStatus -> (aplg -> MergeStatus, aplg) #

[Undo] ~ aplg => HasField "undos" MergeStatus aplg 
Instance details

Defined in Mit

Methods

hasField :: MergeStatus -> (aplg -> MergeStatus, aplg) #

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'.

data Summary Source #

Constructors

Summary 

Fields

Instances

Instances details
Text ~ aplg => HasField "branch" Summary aplg 
Instance details

Defined in Mit

Methods

hasField :: Summary -> (aplg -> Summary, aplg) #

Bool ~ aplg => HasField "canUndo" Summary aplg 
Instance details

Defined in Mit

Methods

hasField :: Summary -> (aplg -> Summary, aplg) #

[GitConflict] ~ aplg => HasField "conflicts" Summary aplg 
Instance details

Defined in Mit

Methods

hasField :: Summary -> (aplg -> Summary, aplg) #

[Sync] ~ aplg => HasField "syncs" Summary aplg 
Instance details

Defined in Mit

Methods

hasField :: Summary -> (aplg -> Summary, aplg) #

data Sync Source #

Constructors

Sync 

Instances

Instances details
Seq1 GitCommitInfo ~ aplg => HasField "commits" Sync aplg 
Instance details

Defined in Mit

Methods

hasField :: Sync -> (aplg -> Sync, aplg) #

SyncResult ~ aplg => HasField "result" Sync aplg 
Instance details

Defined in Mit

Methods

hasField :: Sync -> (aplg -> Sync, aplg) #

Text ~ aplg => HasField "source" Sync aplg 
Instance details

Defined in Mit

Methods

hasField :: Sync -> (aplg -> Sync, aplg) #

Text ~ aplg => HasField "target" Sync aplg 
Instance details

Defined in Mit

Methods

hasField :: Sync -> (aplg -> Sync, aplg) #

data MitState a Source #

Constructors

MitState 

Fields

Instances

Instances details
a ~ aplg => HasField "head" (MitState a) aplg 
Instance details

Defined in Mit

Methods

hasField :: MitState a -> (aplg -> MitState a, aplg) #

Maybe Text ~ aplg => HasField "merging" (MitState a) aplg 
Instance details

Defined in Mit

Methods

hasField :: MitState a -> (aplg -> MitState a, aplg) #

Maybe Integer ~ aplg => HasField "ranCommitAt" (MitState a) aplg 
Instance details

Defined in Mit

Methods

hasField :: MitState a -> (aplg -> MitState a, aplg) #

[Undo] ~ aplg => HasField "undos" (MitState a) aplg 
Instance details

Defined in Mit

Methods

hasField :: MitState a -> (aplg -> MitState a, aplg) #

Eq a => Eq (MitState a) Source # 
Instance details

Defined in Mit

Methods

(==) :: MitState a -> MitState a -> Bool #

(/=) :: MitState a -> MitState a -> Bool #

Show a => Show (MitState a) Source # 
Instance details

Defined in Mit

Methods

showsPrec :: Int -> MitState a -> ShowS #

show :: MitState a -> String #

showList :: [MitState a] -> ShowS #

data Undo Source #

Constructors

Apply Text 
Reset Text 
Revert Text 

Instances

Instances details
Eq Undo Source # 
Instance details

Defined in Mit

Methods

(==) :: Undo -> Undo -> Bool #

(/=) :: Undo -> Undo -> Bool #

Show Undo Source # 
Instance details

Defined in Mit

Methods

showsPrec :: Int -> Undo -> ShowS #

show :: Undo -> String #

showList :: [Undo] -> ShowS #