def _find_git_files(dirname='', git_dir=None):
 file_list = []
 if (git_dir is None):
  git_dir = pbr.git._run_git_functions()
 if git_dir:
  file_list = pbr.git._run_git_command(['ls-files', '-z'], git_dir)
  file_list += pbr.git._run_git_command(['submodule', 'foreach', '--quiet', 'ls-files', '-z'], git_dir)
  file_list = file_list.split('\x00'.decode('utf-8'))
  submodules = _get_submodules(git_dir)
 return [f for f in file_list if (f and (f not in submodules))]

def _find_git_files ( dirname = '' , git_dir = None ) : file_list = [ ] if ( git_dir is None ) : git_dir = pbr . git . _run_git_functions ( ) if git_dir : file_list = pbr . git . _run_git_command ( [ 'ls-files' , '-z' ] , git_dir ) file_list += pbr . git . _run_git_command ( [ 'submodule' , 'foreach' , '--quiet' , 'ls-files' , '-z' ] , git_dir ) file_list = file_list . split ( '\x00' . decode ( 'utf-8' ) ) submodules = _get_submodules ( git_dir ) return [ f for f in file_list if ( f and ( f not in submodules ) ) ]
behave like a file finder entrypoint plugin .