Skip to content

Commit

Permalink
FIX (maybe): git log
Browse files Browse the repository at this point in the history
  • Loading branch information
reneme committed Sep 29, 2023
1 parent d70cccb commit be07b06
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tools/genaudit/genaudit/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ def merged_pull_requests_between(self, start_ref, end_ref) -> list[refs.PullRequ
"--no-abbrev-commit",
"--grep=^Merge pull request",
"--grep=^Merge GH",
"%s..%s" % (start_ref, end_ref)])
"%s..%s" % (start_ref, end_ref),
"--"])

return [self._extract_pull_request_info(line) for line in out.splitlines()]

Expand All @@ -76,7 +77,8 @@ def manual_merge_commits_to_main_branch_between(self, start_ref, end_ref) -> lis
"--grep=^Merge pull request",
"--grep=^Merge GH",
"--invert-grep",
"%s..%s" % (start_ref, end_ref)])
"%s..%s" % (start_ref, end_ref),
"--"])

return self._extract_commit_ref_from_log_output(out)

Expand All @@ -95,14 +97,16 @@ def commits_to_main_branch_between(self, start_ref, end_ref) -> list[refs.Commit
"--oneline",
"--no-abbrev-commit",
"--no-merges",
"^%s" % start_ref]))
"^%s" % start_ref,
"--"]))
all_commits_between_start_and_end_ref = self._extract_commit_ref_from_log_output(
self._run_git(["log",
"--no-decorate",
"--oneline",
"--no-abbrev-commit",
"--no-merges",
"%s..%s" % (start_ref, end_ref)]))
"%s..%s" % (start_ref, end_ref),
"--"]))
return [sha for sha in all_commits_between_start_and_end_ref if sha in commits_to_main_since_start_ref]

def tip_of_main_branch(self) -> Commit:
Expand Down

0 comments on commit be07b06

Please sign in to comment.