MCPcopy Index your code
hub / github.com/Persper/code-analytics / find_first_commit

Function find_first_commit

tools/repo_creater/create_repo.py:65–74  ·  view source on GitHub ↗
(graph)

Source from the content-addressed store, hash-verified

63
64
65def find_first_commit(graph):
66 first = None
67 for n in graph.nodes():
68 if graph.in_degree(n) == 0:
69 if first is None:
70 first = n
71 else:
72 print("Multiple starting nodes is not supported.")
73 sys.exit()
74 return first
75
76
77def depth_first_traverse(graph, first_commit):

Callers 1

create_repoFunction · 0.85

Calls 2

nodesMethod · 0.80
exitMethod · 0.80

Tested by

no test coverage detected