git-brunch 1.0.5.0 → 1.0.6.0
raw patch · 4 files changed
+51/−28 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- README.md +14/−0
- git-brunch.cabal +12/−3
- src/Git.hs +2/−2
- src/GitBrunch.hs +23/−23
README.md view
@@ -54,3 +54,17 @@ cd git-brunch nix-env -if . ```++## Development++### Run tests++```shell+stack test --fast --file-watch+```++### Build statically linked++```shell+stack install --flag git-brunch:static+```
git-brunch.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 04ccac3b833e799f1ab4caf4aecc4d2683bb9be8dc91f06c9f5f89d78141a8e7+-- hash: 444816bc5a9f874d6d5e86b15596505e88251387994393c341e0268092854eb6 name: git-brunch-version: 1.0.5.0+version: 1.0.6.0 synopsis: git checkout command-line tool description: Please see the README on GitHub at <https://github.com/andys8/git-brunch#readme> category: Git@@ -26,6 +26,10 @@ type: git location: https://github.com/andys8/git-brunch +flag static+ manual: True+ default: False+ library git-brunch-lib exposed-modules: Git@@ -53,7 +57,6 @@ Paths_git_brunch hs-source-dirs: app- ghc-options: -threaded -rtsopts -with-rtsopts=-N build-depends: base >=4.7 && <5 , brick@@ -62,6 +65,12 @@ , process , vector , vty+ if flag(static)+ ghc-options: -static -threaded -rtsopts -with-rtsopts=-N+ cc-options: -static+ ld-options: -static -pthread+ else+ ghc-options: -threaded -rtsopts -with-rtsopts=-N default-language: Haskell2010 test-suite git-brunch-test
src/Git.hs view
@@ -8,7 +8,7 @@ import System.Process import Data.List-import Data.Char ( isSpace )+import Data.Char ( isSpace ) import System.Exit data Branch = BranchLocal String@@ -74,4 +74,4 @@ isHead :: String -> Bool-isHead name = isInfixOf "HEAD" name+isHead = isInfixOf "HEAD"
src/GitBrunch.hs view
@@ -5,41 +5,41 @@ ) where -import Data.Maybe ( fromMaybe )+import Data.Maybe ( fromMaybe ) import qualified Graphics.Vty as V-import Lens.Micro ( (^.) -- view- , (.~) -- set- , (%~) -- over- , (&)- , Lens'- , lens- )+import Lens.Micro ( (^.) -- view+ , (.~) -- set+ , (%~) -- over+ , (&)+ , Lens'+ , lens+ ) import qualified Brick.Main as M-import Brick.Types ( Widget )-import Brick.Themes ( themeToAttrMap )+import Brick.Types ( Widget )+import Brick.Themes ( themeToAttrMap ) import qualified Brick.Types as T import qualified Brick.Widgets.Border as B import qualified Brick.Widgets.Border.Style as BS import qualified Brick.Widgets.Center as C-import Brick.Widgets.Core ( hLimit- , str- , vBox- , hBox- , padAll- , padLeft- , padRight- , withAttr- , withBorderStyle- , (<+>)- )+import Brick.Widgets.Core ( hLimit+ , str+ , vBox+ , hBox+ , padAll+ , padLeft+ , padRight+ , withAttr+ , withBorderStyle+ , (<+>)+ ) import qualified Brick.Widgets.List as L import qualified Data.Vector as Vec import Data.List import Data.Char import Git-import Theme ( theme )+import Theme ( theme ) data Name = Local | Remote deriving (Ord, Eq, Show)@@ -52,7 +52,7 @@ finalState <- M.defaultMain app (initialState branches) printResult =<< checkoutBranch (selectedBranch finalState) where- printResult (Left err) = putStr err+ printResult (Left err) = putStrLn err printResult (Right msg) = putStr msg checkoutBranch (Just b) = Git.checkout b checkoutBranch Nothing = pure $ Left "No branch selected."