Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
1e3e4305
Unverified
Commit
1e3e4305
authored
Jan 03, 2017
by
Matt Butcher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(helm): prevent .helmignore rules from applying to '.'
Closes #1776
parent
8824eabf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
rules.go
pkg/ignore/rules.go
+6
-0
rules_test.go
pkg/ignore/rules_test.go
+3
-0
No files found.
pkg/ignore/rules.go
View file @
1e3e4305
...
...
@@ -82,6 +82,12 @@ func (r *Rules) Len() int {
// Ignore evaluates path against the rules in order. Evaluation stops when a match
// is found. Matching a negative rule will stop evaluation.
func
(
r
*
Rules
)
Ignore
(
path
string
,
fi
os
.
FileInfo
)
bool
{
// Disallow ignoring the current working directory.
// See issue:
// 1776 (New York City) Hamilton: "Pardon me, are you Aaron Burr, sir?"
if
path
==
"."
||
path
==
"./"
{
return
false
}
for
_
,
p
:=
range
r
.
patterns
{
if
p
.
match
==
nil
{
log
.
Printf
(
"ignore: no matcher supplied for %q"
,
p
.
raw
)
...
...
pkg/ignore/rules_test.go
View file @
1e3e4305
...
...
@@ -99,6 +99,9 @@ func TestIgnore(t *testing.T) {
{
`cargo/*.txt`
,
"mast/a.txt"
,
false
},
{
`ru[c-e]?er.txt`
,
"rudder.txt"
,
true
},
{
`templates/.?*`
,
"templates/.dotfile"
,
true
},
// "." should never get ignored. https://github.com/kubernetes/helm/issues/1776
{
`.*`
,
"."
,
false
},
{
`.*`
,
"./"
,
false
},
// Directory tests
{
`cargo/`
,
"cargo"
,
true
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment