MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / build_git_env

Function build_git_env

ci/torch_latest.py:197–211  ·  view source on GitHub ↗
(source: Mapping[str, str] | None = None)

Source from the content-addressed store, hash-verified

195
196
197def build_git_env(source: Mapping[str, str] | None = None) -> dict[str, str]:
198 source = source or os.environ
199 result = {
200 "GIT_TERMINAL_PROMPT": "0",
201 "GIT_ASKPASS": "/bin/false",
202 "SSH_ASKPASS": "/bin/false",
203 "GIT_CONFIG_NOSYSTEM": "1",
204 "GIT_CONFIG_GLOBAL": "/dev/null",
205 "GIT_LFS_SKIP_SMUDGE": "1",
206 "LC_ALL": "C.UTF-8",
207 }
208 for key in ("PATH", "SYSTEMROOT"):
209 if source.get(key):
210 result[key] = source[key]
211 return result
212
213
214def _git_command(*args: str) -> list[str]:

Callers 2

_run_localFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected