File tree 7 files changed +8
-15
lines changed
7 files changed +8
-15
lines changed Original file line number Diff line number Diff line change 14
14
# Dependency directories (remove the comment below to include it)
15
15
# vendor/
16
16
bin
17
- multi.json
18
- multi.ignore
19
17
coverage.txt
20
- .multi
21
- .multiverse
22
- .DS_Store
18
+ .multi /
19
+ .DS_Store
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ module github.com/multiverse-vcs/go-multiverse
3
3
go 1.16
4
4
5
5
require (
6
- github.com/bmatcuk/doublestar/v3 v3.0.0
7
6
github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9 // indirect
8
7
github.com/ipfs/go-bitswap v0.3.2
9
8
github.com/ipfs/go-blockservice v0.1.4
Original file line number Diff line number Diff line change @@ -15,8 +15,6 @@ github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5
15
15
github.com/benbjohnson/clock v1.0.2 /go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM =
16
16
github.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg =
17
17
github.com/benbjohnson/clock v1.0.3 /go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM =
18
- github.com/bmatcuk/doublestar/v3 v3.0.0 h1:TQtVPlDnAYwcrVNB2JiGuMc++H5qzWZd9PhkNo5WyHI =
19
- github.com/bmatcuk/doublestar/v3 v3.0.0 /go.mod h1:6PcTVMw80pCY1RVuoqu3V++99uQB3vsSYKPTd8AWA0k =
20
18
github.com/btcsuite/btcd v0.0.0-20190213025234-306aecffea32 /go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8 =
21
19
github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c /go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI =
22
20
github.com/btcsuite/btcd v0.0.0-20190605094302-a0d1e3e36d50 /go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI =
Original file line number Diff line number Diff line change @@ -16,8 +16,7 @@ type Filter []Rule
16
16
func New (dir string , patterns ... string ) Filter {
17
17
var rules []Rule
18
18
for _ , p := range patterns {
19
- rule := ParseRule (filepath .Join (dir , p ))
20
- rules = append (rules , rule )
19
+ rules = append (rules , ParseRule (dir , p ))
21
20
}
22
21
23
22
return Filter (rules )
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ func (r EmptyRule) Match(name string) (bool, error) {
54
54
}
55
55
56
56
// ParseRule returns a rule for the given pattern.
57
- func ParseRule (pattern string ) Rule {
57
+ func ParseRule (dir , pattern string ) Rule {
58
58
pattern = strings .TrimSpace (pattern )
59
59
if pattern == "" {
60
60
return EmptyRule (pattern )
@@ -66,9 +66,9 @@ func ParseRule(pattern string) Rule {
66
66
67
67
var rule Rule
68
68
if strings .Contains (pattern , "/" ) {
69
- rule = PathRule (pattern )
69
+ rule = PathRule (filepath . Join ( dir , pattern ) )
70
70
} else {
71
- rule = BaseRule (filepath . Base ( pattern ) )
71
+ rule = BaseRule (pattern )
72
72
}
73
73
74
74
if strings .HasPrefix (pattern , "!" ) {
Original file line number Diff line number Diff line change 2
2
3
3
foo
4
4
5
- ! bar
5
+ bar
6
6
7
- /foo/bar
7
+ /foo/bar
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ b
You can’t perform that action at this time.
0 commit comments