MCPcopy Create free account
hub / github.com/argotorg/solidity / git_diff

Function git_diff

scripts/common/git_helpers.py:24–39  ·  view source on GitHub ↗
(file_a: Path, file_b: Path)

Source from the content-addressed store, hash-verified

22
23
24def git_diff(file_a: Path, file_b: Path) -> int:
25 if which('git') is None:
26 raise RuntimeError('git not found.')
27
28 return subprocess.run([
29 'git',
30 'diff',
31 '--color',
32 '--word-diff=plain',
33 '--word-diff-regex=.',
34 '--ignore-space-change',
35 '--ignore-blank-lines',
36 '--exit-code',
37 file_a,
38 file_b,
39 ], encoding='utf8', check=False).returncode

Callers 2

Calls 1

runMethod · 0.45

Tested by 2