Skip to content

Commit

Permalink
Fix the empty branch bug caused by sed command
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Feb 22, 2020
1 parent 50777d2 commit b5f0279
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion god.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ func prepareCmds() []string {
// tr -d '*' -> Remove the '*' character.
parseGitCmd :=
"git help | grep '^ *[a-z]' | " + removeSpaces +
"git branch | tr -d '*' | " + removeSpaces +
"git branch | tr -d '*' | " +
strings.Replace(removeSpaces, " -e 's/ *[A-Z].*//'", "", 1) +
"git remote"
cmdStr := execCmd(parseGitCmd, false)
gitCmdSlice = strings.Split(cmdStr, "\n")
Expand Down

0 comments on commit b5f0279

Please sign in to comment.