Skip to content

Commit

Permalink
fix false error reporting for .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
piranha committed Jul 2, 2013
1 parent bc29d89 commit 5654c74
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ supported as replacement, no regexp submatch support yet (planned, though).

## Changelog

- 1.6
- Add option to not colorize output
- Remove false error reporting about parsing .gitmodules
- 1.5
- Fix deadlock when stumbling around a pile of unreadable files (a lot of
symlinks pointing nowhere, for example)
Expand Down
7 changes: 3 additions & 4 deletions goreplace.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ import (
"regexp"
)

var (
const (
Author = "Alexander Solovyov"
Version = "1.5"

byteNewLine = []byte("\n")
Version = "1.6"
)
var byteNewLine = []byte("\n")

var opts struct {
IgnoreCase bool `short:"i" long:"ignore-case" description:"ignore pattern case"`
Expand Down
4 changes: 3 additions & 1 deletion matcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,9 @@ func gitGlobRe(s string) *regexp.Regexp {
}

re, err := regexp.Compile(pat.String())
errhandle(fmt.Errorf("can't parse pattern '%s': %s", s, err), false)
if err != nil {
errhandle(fmt.Errorf("can't parse pattern '%s': %s", s, err), false)
}
return re
}

Expand Down

0 comments on commit 5654c74

Please sign in to comment.