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 symbolsLoading
| Symbol | File | Resolved by |
|---|---|---|
| RepoSpecError | git_source.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| open_checkout | git_source.py | same file |
| submit_repository | router.py | through an import |
| Symbol | File | Resolved by |
|---|---|---|
| git_source | git_source.py | same 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 refWhat 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
