Back to the room

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 symbols

Loading

Calls (4)
SymbolFileResolved by
_classifygit_source.pysame file
_git_envgit_source.pysame file
_sanitizegit_source.pysame file
GitErrorgit_source.pysame file
Called by (4)
SymbolFileResolved by
_local_refgit_source.pysame file
_gitgit_source.pysame file
local_git_dirgit_source.pysame file
open_checkoutgit_source.pysame file
Inside (1)
SymbolFileResolved by
git_sourcegit_source.pysame 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

Read it on GitHub at this commit