Skip to content

Commit

Permalink
bring in go-gitignore to resolve bug
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter committed Jun 10, 2020
1 parent a01fa93 commit e4efb5e
Show file tree
Hide file tree
Showing 14 changed files with 7 additions and 10 deletions.
9 changes: 0 additions & 9 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion file/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package file

import (
"errors"
"github.com/monochromegane/go-gitignore"
"github.com/boyter/cs/processor/go-gitignore"
"io/ioutil"
"os"
"path"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ func newInitialPatternHolder() initialPatternHolder {

func (h *initialPatternHolder) add(pattern string) {
trimedPattern := strings.TrimPrefix(pattern, "/")

// https://github.com/boyter/scc/issues/149
if trimedPattern == "" {
return
}

if strings.IndexAny(trimedPattern[0:1], initials) != -1 {
h.patterns.set(trimedPattern[0], newPatternForEqualizedPath(pattern))
} else {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e4efb5e

Please sign in to comment.