Merge pull request #13611 from duglin/Issue13417a

Allow .dockerignore to ignore everything
This commit is contained in:
Jessie Frazelle 2015-06-01 15:59:57 -07:00
commit be2a96cfe7

View file

@ -40,7 +40,6 @@ func CleanPatterns(patterns []string) ([]string, [][]string, bool, error) {
} }
if Exclusion(pattern) { if Exclusion(pattern) {
if len(pattern) == 1 { if len(pattern) == 1 {
logrus.Errorf("Illegal exclusion pattern: %s", pattern)
return nil, nil, false, errors.New("Illegal exclusion pattern: !") return nil, nil, false, errors.New("Illegal exclusion pattern: !")
} }
exceptions = true exceptions = true
@ -94,7 +93,6 @@ func OptimizedMatches(file string, patterns []string, patDirs [][]string) (bool,
match, err := filepath.Match(pattern, file) match, err := filepath.Match(pattern, file)
if err != nil { if err != nil {
logrus.Errorf("Error matching: %s (pattern: %s)", file, pattern)
return false, err return false, err
} }
@ -114,6 +112,7 @@ func OptimizedMatches(file string, patterns []string, patDirs [][]string) (bool,
if matched { if matched {
logrus.Debugf("Skipping excluded path: %s", file) logrus.Debugf("Skipping excluded path: %s", file)
} }
return matched, nil return matched, nil
} }