MCPcopy Index your code
hub / github.com/nodejs/node / EnsureGit

Function EnsureGit

tools/v8/fetch_deps.py:58–74  ·  view source on GitHub ↗
(v8_path)

Source from the content-addressed store, hash-verified

56]
57
58def EnsureGit(v8_path):
59 def git(args):
60 # shell=True needed on Windows to resolve git.bat.
61 return subprocess.check_output(
62 "git " + args, cwd=v8_path, shell=True).strip()
63
64 expected_git_dir = os.path.join(v8_path, ".git")
65 actual_git_dir = git("rev-parse --absolute-git-dir")
66 if expected_git_dir == actual_git_dir:
67 print("V8 is tracked stand-alone by git.")
68 return False
69 print("Initializing temporary git repository in v8.")
70 git("init")
71 git("config user.name \"Ada Lovelace\"")
72 git("config user.email ada@lovela.ce")
73 git("commit --allow-empty -m init")
74 return True
75
76def FetchDeps(v8_path):
77 # Verify path.

Callers 1

FetchDepsFunction · 0.85

Calls 3

gitFunction · 0.85
printFunction · 0.50
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…