Back to the room

Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works

Code Observatory / method

list_files

codeintel.git_source.Checkout.list_files

PINNED SOURCE Source and edges from the index at this commit. An execution appears only where one was recorded.

PHAROS at 975a38dMIT license

Around this symbol

Search all symbols

Loading

Calls (2)
SymbolFileResolved by
_gitgit_source.pysame file
TreeEntrygit_source.pysame file
Called by (1)
SymbolFileResolved by
_syncindexer.pyunique name
Inside (1)
SymbolFileResolved by
Checkoutgit_source.pysame file
codeintel.git_source.Checkout.list_filesbackend/app/codeintel/git_source.py, lines 368–381Open source
    def list_files(self) -> Iterator[TreeEntry]:        """Regular files tracked at the commit (symlinks and submodules excluded)."""        out = self._git("ls-tree", "-r", "-z", "--long", "--full-tree", self.commit, timeout=300)        for record in out.split("\0"):            if not record:                continue            meta, _, path = record.partition("\t")            fields = meta.split()            if len(fields) != 4:                continue            mode, obj_type, sha, size = fields            if obj_type != "blob" or mode not in ("100644", "100755"):                continue            yield TreeEntry(path=path, blob_sha=sha, size=int(size) if size.isdigit() else 0, mode=mode)

What the index recorded

Signature
def list_files(self) -> Iterator[TreeEntry]:
File
backend/app/codeintel/git_source.py
Lines
368–381
Parser
python-ast
Git blob
6f88470169e4935929c5f865a974bd86da564c1a
Call sites
7 named, 2 resolved, 5 left unlinked
Outside this subset
2 more edges reach code outside the graph shown here

Read it on GitHub at this commit