code: def overlay(repository, files, version, debug=False):
      
      with util.saved_cwd():
          os.chdir(repository)
          _get_version(version, debug)
  
          for fc in files:
              if '*' in fc.src:
                  for filename in glob.glob(fc.src):
                      util.copy(filename, fc.dst)
                      msg = '  - copied ({}) {} to {}'.format(
                          version, filename, fc.dst)
                      util.print_info(msg)
              else:
                  if os.path.isdir(fc.dst) and os.path.isdir(fc.src):
                      shutil.rmtree(fc.dst)
                  util.copy(fc.src, fc.dst)
                  msg = '  - copied ({}) {} to {}'.format(
                      version, fc.src, fc.dst)
                  util.print_info(msg)
docs: Overlay files from the specified repository/version into the given
      directory and return None.
  
      :param repository: A string containing the path to the repository to be
       extracted.
      :param files: A list of `FileConfig` objects.
      :param version: A string containing the branch/tag/sha to be exported.
      :param debug: An optional bool to toggle debug output.
      :return: None