When current branch is forward from upstream, send BN_CLICKED to Abort button to close the dialog.
No need to call m_CommitList.GetItemCount() on line 577, m_CommitList is cleared on line 573 and has zero size.
Repo to test repo1.zip
With preview 220.127.116.11 the Rebase dialog remains open when
pull.rebase=true is set