MCPcopy Create free account
hub / github.com/Persper/code-analytics / _diff_with_first_parent

Function _diff_with_first_parent

persper/graphs/git_tools.py:8–15  ·  view source on GitHub ↗
(commit)

Source from the content-addressed store, hash-verified

6
7
8def _diff_with_first_parent(commit):
9 if len(commit.parents) == 0:
10 prev_commit = EMPTY_TREE_SHA
11 else:
12 prev_commit = commit.parents[0]
13 # commit.diff automatically detect renames
14 return commit.diff(prev_commit,
15 create_patch=True, R=True, indent_heuristic=True)
16
17
18def initialize_repo(repo_path):

Callers 1

_analyze_commitMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected