Skip to content

Commit 9afca9b

Browse files
committed
Simplify rebae logic to keep base branch up to date
1 parent 25b6fc9 commit 9afca9b

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

llvm/utils/llvm_push_pr.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -557,16 +557,14 @@ def run(self) -> None:
557557
branch_base_name = self._sanitize_branch_name(first_commit_title)
558558

559559
for i in range(len(commits)):
560-
if i > 0:
561-
self._rebase_current_branch()
562-
563-
# After a rebase, the commit hashes can change, so we need to
564-
# get the latest commit stack.
565-
commits = self._get_commit_stack()
566560
if not commits:
567561
self.runner.print("Success! All commits have been landed.")
568562
break
569563
self._process_commit(commits[0], branch_base_name, i)
564+
self._rebase_current_branch()
565+
# After a rebase, the commit hashes can change, so we need to
566+
# get the latest commit stack.
567+
commits = self._get_commit_stack()
570568

571569
finally:
572570
self._cleanup()

0 commit comments

Comments
 (0)