Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
seachicken committed Sep 9, 2023
1 parent e130577 commit aedc78a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion shared/branch.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ const (
Deleted
)

var detachedBranchNameRegex = regexp.MustCompile(`^\(.+\)`)

func (b Branch) IsDetached() bool {
detachedBranchNameRegex := regexp.MustCompile(`^\(.+\)`)
return detachedBranchNameRegex.MatchString(b.Name)
}

0 comments on commit aedc78a

Please sign in to comment.