MCPcopy
hub / github.com/pytorch/vision / get_commits_between

Function get_commits_between

scripts/release_notes/retrieve_prs_data.py:165–178  ·  view source on GitHub ↗
(base_version, new_version)

Source from the content-addressed store, hash-verified

163
164
165def get_commits_between(base_version, new_version):
166 cmd = f"git merge-base {base_version} {new_version}"
167 rc, merge_base, _ = run(cmd)
168 assert rc == 0
169
170 # Returns a list of something like
171 # b33e38ec47 Allow a higher-precision step type for Vec256::arange (#34555)
172 cmd = f"git log --reverse --oneline {merge_base}..{new_version}"
173 rc, commits, _ = run(cmd)
174 assert rc == 0
175
176 log_lines = commits.split("\n")
177 hashes, titles = zip(*[log_line.split(" ", 1) for log_line in log_lines])
178 return hashes, titles
179
180
181def convert_to_dataframes(feature_list):

Callers 1

mainFunction · 0.85

Calls 1

runFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…