Fetches all files that are currently under git.
547960
private function fetchAllFilesUnderGit()
  {
    $command = "git ls-files";
    exec($command, $output, $return);
    if ($return!=0) $this->logError("Can not execute command %s in exec", $command);

    foreach ($output as $filename)
    {
      $this->myLastCommitTimes[$filename] = 0;
    }
  }
722946
def collect_files(path, extension):
    """"""

    # We should only call this on an actual directory; callers should do the
    # validation.
    assert os.path.isdir(path)
    out = []
    # glob would be faster (see PEP471) but python glob doesn't do **/*
    for root, _, files in os.walk(path):
        out += [os.path.join(root, f) for f in files if f.endswith(extension)]
    return out
281697
def get_versioned_files(cls):
        """"""
        output = run(['svn', 'st', '-vq', '--xml'], decode=False)
        tree = ET.XML(output)
        return sorted(entry.get('path') for entry in tree.findall('.//entry')
                      if cls.is_interesting(entry))
732824
function getStagedFiles(callback) {

    const options = [ 'diff', '--cached', '--name-only', '--diff-filter=ACM' ]

    execFile('git', options, (err, stdout) => {

        if (err) return callback(err)

        const stagedFiles = stdout
            .split('\n')
            .filter(filename => filename.match(/.js$/))

        callback(null, stagedFiles)

    })

}
143668
def GetAllFiles(self):
    
    for filepath in self._files:
      yield filepath

    for dirpath in self._dirs:
      for filepath in ArtifactRegistrySources._GetDirYamlFiles(dirpath):
        if filepath in self._files:
          continue
        yield filepath
351690
function defFiles() {
  var   files = sh.exec(`git ls-files`, {silent:true}).stdout.split('\n');

  files = files.filter(file => file.endsWith('.js'));
  files = files.filter(file => !file.endsWith('.test.js'));
  // files = files.filter(file => file.startsWith('src/'));

  // files = files.filter(file => file.indexOf('/lambda') === -1);
  // files = files.filter(file => file.indexOf('src/utils') === -1);
  // files = files.filter(file => file.indexOf('src/app/app.js') === -1);
  // files = files.filter(file => file.indexOf('src/app/host.js') === -1);

  // files = files.filter(file => file.indexOf('src/lib/client-start.js') === -1);
  // files = files.filter(file => file.indexOf('src/lib/ingest.js') === -1);

  // files = [
  //   'src/lib/client-start.js',
  //   'src/lib/ingest.js',
  //   ...files
  // ];

  return files;
}
1023522
def git_status_all_repos(cat, hard=True, origin=False, clean=True):
    
    log = cat.log
    log.debug("gitter.git_status_all_repos()")

    all_repos = cat.PATHS.get_all_repo_folders()
    for repo_name in all_repos:
        log.info("Repo in: '{}'".format(repo_name))
        # Get the initial git SHA
        sha_beg = get_sha(repo_name)
        log.debug("Current SHA: '{}'".format(sha_beg))

        log.info("Fetching")
        fetch(repo_name, log=cat.log)

        git_comm = ["git", "status"]
        _call_command_in_repo(
            git_comm, repo_name, cat.log, fail=True, log_flag=True)

        sha_end = get_sha(repo_name)
        if sha_end != sha_beg:
            log.info("Updated SHA: '{}'".format(sha_end))

    return
342691
def fetch(self, remote='origin'):
        """"""
        git(self.gitdir, "fetch", remote, _env=self.env())
312474
def fetch():
    
    mir, r, slackpkg_last_date = mirror(), "", ""
    count, upgraded = 0, []
    if mir:
        tar = urlopen(mir)
        try:
            r = tar.read()
        except AttributeError:
            print("sun: error: can't read mirror")
    if os.path.isfile(var_lib_slackpkg + changelog_txt):
        slackpkg_last_date = read_file("{0}{1}".format(
            var_lib_slackpkg, changelog_txt)).split("\n", 1)[0].strip()
    else:
        return [count, upgraded]
    for line in r.splitlines():
        if slackpkg_last_date == line.strip():
            break
        if (line.endswith("z:  Upgraded.") or line.endswith("z:  Rebuilt.") or
                line.endswith("z:  Added.") or line.endswith("z:  Removed.")):
            upgraded.append(line.split("/")[-1])
            count += 1
        if (line.endswith("*:  Upgraded.") or line.endswith("*:  Rebuilt.") or
                line.endswith("*:  Added.") or line.endswith("*:  Removed.")):
            upgraded.append(line)
            count += 1
    return [count, upgraded]
115829
def get_contents(self, path, ref=github.GithubObject.NotSet):
        
        return self.get_file_contents(path, ref)
1242775
def file_list(self):
        
        blacklist = ['.git', 'aetros']
        working_tree = self.git.work_tree

        def recursive(path='.'):
            if os.path.basename(path) in blacklist:
                return 0, 0

            if os.path.isdir(path):
                files = []
                for file in os.listdir(path):
                    if path and path != '.':
                        file = path + '/' + file

                    added_files = recursive(file)
                    files += added_files

                return files
            else:
                if path.endswith('.pyc'):
                    return []

                if is_ignored(path, self.config['ignore']):
                    return []

                return [os.path.relpath(path, working_tree)]

        return recursive(working_tree)
69498
def get_files_in_commit(git_folder, commit_id="HEAD"):
    
    repo = Repo(str(git_folder))
    output = repo.git.diff("--name-only", commit_id+"^", commit_id)
    return output.splitlines()
173340
def refresh(path=None):
    """"""
    global GIT_OK
    GIT_OK = False

    if not Git.refresh(path=path):
        return
    if not FetchInfo.refresh():
        return

    GIT_OK = True
1301433
def pull_all_repos():
    """"""
    repos = ClonedRepo.objects.all()
    for repo in repos:
        if repo.origin is not None:
            pull_repo.delay(repo_name=repo.name)
1204702
def all_modified_files_coverage
      unless @project.nil?
        all_modified_files_coverage ||= begin
          modified_files = git.modified_files.nil? ? [] : git.modified_files
          added_files = git.added_files.nil? ? [] : git.added_files
          all_changed_files = modified_files | added_files
          @project.coverage_files.select do |file|
            all_changed_files.include? file.source_file_pathname_relative_to_repo_root.to_s
          end
        end

        all_modified_files_coverage
      end
    end
149568
def _compute_all_files(self):
        """"""
        self._all_files = any(pat.all_files() for pat in self.patterns)
226866
def archive_all_files(self, archiver):
        
        for file_path in self.extra:
            archiver(path.abspath(file_path), path.join(self.prefix, file_path))

        for file_path in self.walk_git_files():
            archiver(path.join(self.main_repo_abspath, file_path), path.join(self.prefix, file_path))