I am looking at a good first issue on the Bitcoin Core repo to find and replace a string. But it appears I need to write a scripted-diff and the examples look complicated. What is the point of the scripted diff? Why is it required for such a simple change?

This question was asked by prayank23 on GitHub and has been paraphrased.

1 Answer 1


From the Bitcoin Core developer notes, when the bash script is included in the commit message the "Travis CI job checks that the result of the script is identical to the commit." It also makes it more efficient to review for reviewers if they can review and run a bash script rather than needing to do additional checks that the PR covers all the cases it should.

With regards to the scripted-diff examples looking complicated you can look through other examples in the Bitcoin Core repo by running:

git log --grep="-BEGIN VERIFY SCRIPT-"

Alternatively here is a simpler example that you can start from if you are trying to do a basic find and replace exercise.

For more information on scripted-diffs see Jon Atack's personal notes on scripted-diffs.

If you need help writing your bash script you can ask questions on #bitcoin-core-pr-reviews on IRC.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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