Skip to content

Commit 07bec95

Browse files
authored
[BE] Remove duplicate, stale copy of github_analyze script (#6490)
There were two versions of this file, one an old fork of the other from back when pytorch/builder existed. Deleting the older forked version of this file in favor of the updated analytics version. The fork had exactly one significant change (an extra parameter that it accepted), so integrated that change into the script we're preserving github_analyze.py is called in exactly two situations: by reverts.py (it's import has been updated) and manually by github_analyze.py
1 parent 8024082 commit 07bec95

File tree

3 files changed

+10
-508
lines changed

3 files changed

+10
-508
lines changed

tools/analytics/github_analyze.py

100755100644
Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,16 @@ def __init__(self, path, remote="upstream"):
207207
def _run_git_cmd(self, *args) -> str:
208208
return _check_output(["git", "-C", self.repo_dir] + list(args))
209209

210-
def _run_git_log(self, revision_range) -> List[GitCommit]:
210+
def _run_git_log(self, revision_range, additional_args=[]) -> List[GitCommit]:
211211
log = self._run_git_cmd(
212-
"log", "--format=fuller", "--date=unix", revision_range, "--", "."
212+
"log",
213+
"--format=fuller",
214+
"--date=unix",
215+
revision_range,
216+
*additional_args,
217+
"--",
218+
".",
219+
*additional_args,
213220
).split("\n")
214221
rc: List[GitCommit] = []
215222
cur_msg: List[str] = []

0 commit comments

Comments
 (0)