Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / function
_run
codeintel.git_source._run
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 |
|---|---|---|
| _classify | git_source.py | same file |
| _git_env | git_source.py | same file |
| _sanitize | git_source.py | same file |
| GitError | git_source.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| _local_ref | git_source.py | same file |
| _git | git_source.py | same file |
| local_git_dir | git_source.py | same file |
| open_checkout | git_source.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| git_source | git_source.py | same file |
codeintel.git_source._runbackend/app/codeintel/git_source.py, lines 293–311Open source
def _run(args: list[str], *, timeout: int = GIT_TIMEOUT_SECONDS, env: dict | None = None, input_bytes: bytes | None = None) -> str: try: proc = subprocess.run( args, input=input_bytes, capture_output=True, timeout=timeout, env=env or _git_env(), check=False, ) except subprocess.TimeoutExpired as exc: raise GitError(f"git {args[1:3]} timed out after {timeout}s", retryable=True) from exc except FileNotFoundError as exc: raise GitError("git executable not found on PATH", retryable=False) from exc if proc.returncode != 0: stderr = proc.stderr.decode("utf-8", errors="replace") raise GitError(f"git failed: {_sanitize(stderr)}", retryable=_classify(stderr)) return proc.stdout.decode("utf-8", errors="replace")What the index recorded
- Signature
def _run(args: list[str], *, timeout: int, env: dict | None, input_bytes: bytes | None) -> str:- File
backend/app/codeintel/git_source.py- Lines
- 293–311
- Parser
- python-ast
- Git blob
6f88470169e4935929c5f865a974bd86da564c1a- Call sites
- 6 named, 4 resolved, 2 left unlinked
