code: def get_ignorer(path, additional_exclusions=None):
      
      ignorefile = zgitignore.ZgitIgnore()
      gitignore_file = os.path.join(path, '.gitignore')
      if os.path.isfile(gitignore_file):
          with open(gitignore_file, 'r') as fileobj:
              ignorefile.add_patterns(fileobj.read().splitlines())
  
      if additional_exclusions is not None:
          ignorefile.add_patterns(additional_exclusions)
  
      return ignorefile
docs: Create ignorer with directory gitignore file.