MCPcopy Index your code
hub / github.com/git/git / run_git_hook

Function run_git_hook

git-p4.py:318–325  ·  view source on GitHub ↗

Execute a hook if the hook exists.

(cmd, param=[])

Source from the content-addressed store, hash-verified

316
317
318def run_git_hook(cmd, param=[]):
319 """Execute a hook if the hook exists."""
320 args = ['git', 'hook', 'run', '--ignore-missing', cmd]
321 if param:
322 args.append("--")
323 for p in param:
324 args.append(p)
325 return subprocess.call(args) == 0
326
327
328def write_pipe(c, stdin, *k, **kw):

Callers 2

applyCommitMethod · 0.85
runMethod · 0.85

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected