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 0098e1a commit 0731388Copy full SHA for 0731388
cmd/utils.go
@@ -24,7 +24,6 @@ import (
24
"errors"
25
"fmt"
26
"os"
27
- "regexp"
28
"strings"
29
"time"
30
@@ -119,9 +118,14 @@ func commit(message string) (err error) {
119
118
s, err := w.Status()
120
checkErr(err)
121
122
- m, _ := regexp.MatchString("A .*", s.String())
+ hasStagingFiles := false
+ for _, status := range s {
123
+ if status.Staging == 77 {
124
+ hasStagingFiles = true
125
+ }
126
127
- if m {
128
+ if hasStagingFiles {
129
username, err := gitconfig.Username()
130
email, err := gitconfig.Email()
131
0 commit comments