Back to the room

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

Code Observatory / function

validate_ref

codeintel.git_source.validate_ref

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 (1)
SymbolFileResolved by
RepoSpecErrorgit_source.pysame file
Called by (2)
SymbolFileResolved by
open_checkoutgit_source.pysame file
submit_repositoryrouter.pythrough an import
Inside (1)
SymbolFileResolved by
git_sourcegit_source.pysame file
codeintel.git_source.validate_refbackend/app/codeintel/git_source.py, lines 224–229Open source
def validate_ref(ref: str | None) -> str | None:    if ref is None or ref == "":        return None    if not _REF_RE.match(ref) or ".." in ref or ref.endswith((".lock", "/")) or "@{" in ref:        raise RepoSpecError(f"invalid branch or ref name {ref!r}")    return ref

What the index recorded

Signature
def validate_ref(ref: str | None) -> str | None:
File
backend/app/codeintel/git_source.py
Lines
224–229
Parser
python-ast
Git blob
6f88470169e4935929c5f865a974bd86da564c1a
Call sites
3 named, 1 resolved, 2 left unlinked
Outside this subset
2 more edges reach code outside the graph shown here

Read it on GitHub at this commit