From 58b18217ee565e6f03d8d65e6e5e70d03704fdc9 Mon Sep 17 00:00:00 2001 From: mattskl-openai Date: Wed, 18 Dec 2024 20:30:14 -0800 Subject: [PATCH] Fix segfault for update --count=1 (#10) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit from https://github.com/ejoffe/spr/pull/423 pr:updateC1Segfault --- **Stack**: -   #13 -   #12 - ➡ #10 ⚠️ *Part of a stack created by [spr](https://github.com/ejoffe/spr). Do not merge manually using the UI - doing so may have unexpected results.* --- spr/spr.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spr/spr.go b/spr/spr.go index 7058eeb..4adbbb2 100644 --- a/spr/spr.go +++ b/spr/spr.go @@ -468,7 +468,7 @@ func sortPullRequestsByLocalCommitOrder(pullRequests []*github.PullRequest, loca var sortedPullRequests []*github.PullRequest for _, commit := range localCommits { - if !commit.WIP { + if !commit.WIP && pullRequestMap[commit.CommitID] != nil { sortedPullRequests = append(sortedPullRequests, pullRequestMap[commit.CommitID]) } }