Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / function
_git_env
codeintel.git_source._git_env
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 |
|---|---|---|
| _run | git_source.py | same file |
| read_blob | git_source.py | same file |
| open_checkout | git_source.py | same file |
| read_file_at_commit | git_source.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| git_source | git_source.py | same file |
codeintel.git_source._git_envbackend/app/codeintel/git_source.py, lines 235–258Open source
def _git_env(extra_config: list[tuple[str, str]] | None = None) -> dict[str, str]: env = dict(os.environ) env.update( GIT_TERMINAL_PROMPT="0", GIT_ASKPASS="", SSH_ASKPASS="", GIT_LFS_SKIP_SMUDGE="1", LC_ALL="C", ) config = list(extra_config or []) # Never follow redirects and never use any transport but https. config += [ ("http.followRedirects", "false"), ("protocol.allow", "never"), ("protocol.https.allow", "always"), ("protocol.file.allow", "always"), # local repositories (CLI) ("core.hooksPath", os.devnull), ] base = int(env.get("GIT_CONFIG_COUNT", "0") or 0) for i, (key, value) in enumerate(config, start=base): env[f"GIT_CONFIG_KEY_{i}"] = key env[f"GIT_CONFIG_VALUE_{i}"] = value env["GIT_CONFIG_COUNT"] = str(base + len(config)) return envWhat the index recorded
- Signature
def _git_env(extra_config: list[tuple[str, str]] | None) -> dict[str, str]:- File
backend/app/codeintel/git_source.py- Lines
- 235–258
- Parser
- python-ast
- Git blob
6f88470169e4935929c5f865a974bd86da564c1a- Call sites
- 8 named, 0 resolved, 8 left unlinked
