Skip to content

Commit

Permalink
fix: detect git branch correctly (#758)
Browse files Browse the repository at this point in the history
* fix: detect git branch correctly

* asd
  • Loading branch information
dbarrosop authored Aug 19, 2023
1 parent 183e1ba commit b910618
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion clienv/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ const (
)

func getGitBranchName() string {
repo, err := git.PlainOpen(".")
repo, err := git.PlainOpenWithOptions(".", &git.PlainOpenOptions{
DetectDotGit: true,
EnableDotGitCommonDir: false,
})
if err != nil {
return "nogit"
}
Expand Down

0 comments on commit b910618

Please sign in to comment.