Merge remote-tracking branch 'origin/master' into topic/bytes

This commit is contained in:
Paul Chiusano 2019-03-19 13:59:48 -04:00
commit 174d08a2af
3 changed files with 7 additions and 0 deletions

View File

@ -199,6 +199,8 @@ type ListDetailed = Bool
data Output v
= Success Input
| CreatedBranch BranchName
| SwitchedBranch BranchName
| NoUnisonFile
| UnknownBranch BranchName
| RenameOutput Name Name NameChangeResult

View File

@ -289,9 +289,11 @@ loop = do
_ <- eval $ NewBranch newBranch branchName
currentBranch .= newBranch
currentBranchName .= branchName
respond $ CreatedBranch $ branchName
Just branch -> do
currentBranch .= branch
currentBranchName .= branchName
respond $ SwitchedBranch $ branchName
quit = MaybeT $ pure Nothing
eval :: Command i v a -> Action i v a

View File

@ -93,6 +93,9 @@ notifyUser dir o = case o of
$ "I don't know of a branch named "
<> P.red (P.text branchName)
<> "."
CreatedBranch branchName ->
putPrettyLn $ "Created the new branch " <> backtickEOS (P.text branchName)
SwitchedBranch _branchName -> pure () -- putPrettyLn "Switched."
RenameOutput oldName newName r -> do
nameChange "rename" "renamed" oldName newName r
AliasOutput existingName newName r -> do