Skip to content

Commit

Permalink
fix: #295 to bring in simplified current brnach changes
Browse files Browse the repository at this point in the history
  • Loading branch information
zaquestion committed Jul 25, 2019
1 parent 5a30108 commit 01d6397
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,12 @@ func Log(sha1, sha2 string) (string, error) {
// CurrentBranch returns the currently checked out branch
func CurrentBranch() (string, error) {
cmd := New("rev-parse", "--abbrev-ref", "HEAD")
cmd.Stdout = nil
branch, err := cmd.Output()
if err != nil {
return "", err
}
return string(branch), nil
return strings.TrimSpace(string(branch)), nil
}

// PathWithNameSpace returns the owner/repository for the current repo
Expand Down

0 comments on commit 01d6397

Please sign in to comment.