File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,19 @@ func main() {
131
131
return
132
132
}
133
133
134
+ // NOTE: exclude git commands to prevent weird errors
135
+ // _git:8182: bad math expression: operand expected at `/home/user/...'
136
+ // _git:8182: bad math expression: operand expected at `/home/user/...'
137
+ // _git:8182: math recursion limit exceeded: name-rev
138
+ // _git:8182: bad math expression: operator expected at `browse'
139
+ if cmdName == "git" || strings .HasPrefix (cmdName , "git-" ) {
140
+ if isVerbose {
141
+ fmt .Printf ("skipped git command: %s\n " , fileName )
142
+ }
143
+ skippedNum ++
144
+ return
145
+ }
146
+
134
147
srcFilePath := filepath .Join (srcDir , fileName )
135
148
srcFile , err := os .Open (filepath .Join (srcFilePath ))
136
149
if err != nil {
You can’t perform that action at this time.
0 commit comments