2

I have written an additional test for an open Bitcoin Core pull request (PR). Should I seek to extend the PR by forking the author's fork of Bitcoin Core and opening a pull request to his PR branch? Should I wait for it to be merged and then open a new PR? Or should I suggest it in the comments of the PR and allow the author to add it to the PR if the author is happy with the test code I have written.

This question was asked by brikk on IRC and has been paraphrased.

3

It depends on the situation. When the change is a few lines of code it is sufficient to show the author the patch and they will amend the pull request. You can do this using a ``` diff in the comments or link to your branch in the comments.

If it is a bigger change, to avoid the clutter of the GitHub UI you can surround it by <details><summary>patch to do foo</summary>```diff ... ```</details>.

However, if it is a really significant change you should probably open a PR to the author's fork of the Bitcoin Core repo asking to merge yourfork/yourbranch into PR-author/PR-branch.

One difference between posting the patch in the GitHub comments vs linking to your branch is that the former will continue to exist even after you delete your branch. Somebody may be curious to look at the patch years later.

This question was answered by vasild on IRC and has been paraphrased.

edit: Jon Atack adds that for commit sized proposals a reviewer generally provides a link to a commit in their fork of the Bitcoin Core repo (or even a link to a branch) and the PR author will then pull in the commit adding it to the PR. An example is here.

Rebased with four commits pulled in from @jnewbery's master...jnewbery:2020-07-split-already-have branch as well as the changes in #19611.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.