Repository navigation
upload: Don't crash when a relative PR has no remote commits - #291
Conversation
|
Reviews in this chain: |
|
i'm not actually sure i buy cursor's reasoning here completely. the stack i was working on didn't have any PRs with 0 commits. this code change does fix the crash i was seeing though. |
|
is the crash reproducible? the change is reasonable defensively i guess but the explanation is suspect |
|
it would take some work to reproduce, but it was repeatable when i had the right PRs up on the right branches cursor now says: but i might lean towards just closing this until i can actually reproduce? |
|
yeah up to you - there should be no harm in merging this other than possibly obscuring the original issue |
|
i think i'd just leave open for now and not merge or close - i don't really like the idea of not knowing why this happens |
|
oooh i just repro'd this. its very subtle |
A relative topic's PR can have pr_info but an empty remote_commits list when its head is already contained in its base, typically after merge. Guard that case instead of indexing remote_commits[-1]. Topic: empty-relative-rebase Co-authored-by: Cursor <cursoragent@cursor.com>
40a7833 to
1989de3
Compare
A relative topic's PR can have pr_info but an empty remote_commits list
when its head is already contained in its base, typically after merge.
Guard that case instead of indexing remote_commits[-1].
Topic: empty-relative-rebase
Co-authored-by: Cursor cursoragent@cursor.com