We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e596818 commit 2b5e578Copy full SHA for 2b5e578
cmd/git.go
@@ -36,11 +36,8 @@ func IsAheadOfCurrent() bool {
36
}
37
38
func IsGitRepo() bool {
39
- _, err := execCommand("git", "status").CombinedOutput()
40
- if err != nil {
41
- return false
42
- }
43
- return true
+ out, _ := execCommand("git", "rev-parse", "--is-inside-work-tree").CombinedOutput()
+ return strings.TrimSpace(string(out)) == "true"
44
45
46
func IsBehindCurrent() bool {
0 commit comments