packages feed

git-brunch 1.4.1.0 → 1.4.2.0

raw patch · 4 files changed

+17/−4 lines, 4 files

Files

README.md view
@@ -41,7 +41,7 @@ #### Install  ```sh-stack install git-brunch # --resolver=lts-16.8+stack install git-brunch # --resolver=lts-16.11 ```  #### Clone and install from source@@ -109,3 +109,4 @@  - [`git-gone`](https://github.com/lunaryorn/git-gone): Lists or removes "gone" branches, that is, local branches which used to have an upstream branch on a remote which is now removed. - [`lazygit`](https://github.com/jesseduffield/lazygit): Terminal UI for git commands+- [`gitui`](https://github.com/extrawurst/gitui): Terminal UI focused on speed in giant repositories
app/Git.hs view
@@ -42,7 +42,8 @@   ]  toBranches :: String -> [Branch]-toBranches input = toBranch <$> filter (not . isHead) (lines input)+toBranches input = toBranch <$> filter validBranch (lines input)+  where validBranch b = not $ isHead b || isDetachedHead b || isNoBranch b  toBranch :: String -> Branch toBranch line = mkBranch $ words $ dropWhile isSpace line@@ -107,3 +108,10 @@ isHead :: String -> Bool isHead = isInfixOf "HEAD" +isDetachedHead :: String -> Bool+isDetachedHead = isInfixOf "HEAD detached"++-- While rebasing git will show "no branch"+-- e.g. "* (no branch, rebasing branch-name)"+isNoBranch :: String -> Bool+isNoBranch = isInfixOf "(no branch,"
git-brunch.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 371122b89d6b4ccfc16cbaff0aff2cf54b1abe0027417524c1f93003f7a1f40c+-- hash: a6badf00f36b9a989355a39bf5abb910c22c370ff5e0e3725145be8fb2a953ca  name:           git-brunch-version:        1.4.1.0+version:        1.4.2.0 synopsis:       git checkout command-line tool description:    Please see the README on GitHub at <https://github.com/andys8/git-brunch> category:       Git
test/Spec.hs view
@@ -32,6 +32,10 @@     $          toBranches "* (HEAD detached at f01a202)"     `shouldBe` [] +  it "ignores 'no branch' during rebase"+    $          toBranches "* (no branch, rebasing branch-name)"+    `shouldBe` []+   it "parses sample output"     $          toBranches sampleOutput     `shouldBe` [ BranchLocal "experimental/failing-debug-log-demo"