MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / sort_commit_hashes

Function sort_commit_hashes

tools/triage_py/triage_version.py:31–40  ·  view source on GitHub ↗
(commits)

Source from the content-addressed store, hash-verified

29args = parser.parse_args()
30
31def sort_commit_hashes(commits):
32 git_cmd = 'git rev-list --abbrev-commit --topo-order --no-walk=sorted --reverse ' + ' '.join(commits)
33 with subprocess.Popen(git_cmd.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=git_repo, universal_newlines=True) as p:
34 stdout, stderr = p.communicate()
35 rc = p.returncode
36 if rc != 0:
37 print('error: sorting commit hashes failed')
38 print(stderr)
39 sys.exit(1)
40 return stdout.splitlines()
41
42verbose = args.verbose
43do_compare = args.compare

Callers 1

triage_version.pyFile · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected