For spr amend --all and spr diff --all we need to fetch information on multiple PRs. This commits ensures that happens in parallel.
The major change here is to make Git: Send + Sync so that it can be used in spawned tasks.
Test Plan:
I used spr diff --all on a branch with multiple local commits in a test repo. I then amended the bottom commit and ran spr diff --all again. Next I ran spr diff --all --cherry-pick to base them all against master. I amended the bottom commit once again and ran spr diff --all --cherry-pick again. All of these operation worked as expected. In the final run of spr, I could see that after typing in a message for the PR update, all other PRs were processed immediately, because their PR info had been fetched in the background already.
For
spr amend --all
andspr diff --all
we need to fetch information on multiple PRs. This commits ensures that happens in parallel. The major change here is to makeGit: Send + Sync
so that it can be used in spawned tasks.Test Plan: I used
spr diff --all
on a branch with multiple local commits in a test repo. I then amended the bottom commit and ranspr diff --all
again. Next I ranspr diff --all --cherry-pick
to base them all against master. I amended the bottom commit once again and ranspr diff --all --cherry-pick
again. All of these operation worked as expected. In the final run of spr, I could see that after typing in a message for the PR update, all other PRs were processed immediately, because their PR info had been fetched in the background already.