         addFileMatcher(matchers, pattern)
 
     matchers
+
+  containsPattern: (matchers, fileOrDirectory, pattern) ->
+    for matcher in matchers[fileOrDirectory]
+      return true if matcher.pattern is pattern
+    false

      matchIndex = pattern.search(directoryPattern)
      addDirectoryMatcher(matchers, pattern.slice(0, matchIndex)) if matchIndex > -1

      matchers.directory.push(new Minimatch(pattern, PathFilter.MINIMATCH_OPTIONS))

    pattern = null

    @exclusions.file.push(matcher)
    @exclusions.directory.push(matcher)

  createMatchers: (patterns=[], {deepMatch, disallowDuplicatesFrom}={}) ->
    addFileMatcher = (matchers, pattern) =>
      return if disallowDuplicatesFrom? and @containsPattern(disallowDuplicatesFrom, 'file', pattern)
      matchers.file.push(new Minimatch(pattern, PathFilter.MINIMATCH_OPTIONS))

    addDirectoryMatcher = (matchers, pattern, deepMatch) =>
      # It is important that we keep two permutations of directory patterns:
      #
      # * 'directory/anotherdir'
