<p>From the Bitcoin Core developer <a href="https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#scripted-diff" rel="nofollow noreferrer">notes</a>, when the bash script is included in the commit message the &quot;Travis CI job checks that the result of the script is identical to the commit.&quot; 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.</p>
<p>With regards to the scripted-diff <a href="https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#suggestions-and-examples" rel="nofollow noreferrer">examples</a> looking complicated you can look through other examples in the Bitcoin Core repo by running:</p>
<pre><code>git log --grep=&quot;-BEGIN VERIFY SCRIPT-&quot;
</code></pre>
<p>Alternatively <a href="https://askubuntu.com/questions/20414/find-and-replace-text-within-a-file-using-commands">here</a> is a simpler example that you can start from if you are trying to do a basic find and replace exercise.</p>
<p>For more information on scripted-diffs see Jon Atack's personal <a href="https://github.com/jonatack/bitcoin-development/blob/master/scripted-diffs.md" rel="nofollow noreferrer">notes</a> on scripted-diffs.</p>
<p>If you need help writing your bash script you can ask questions on #bitcoin-core-pr-reviews on IRC.</p>

CC BY-SA 4.0
2020-09-13T12:47:02.823Z
2020-09-16T12:54:36.870Z
2020-09-16T12:54:36.870Z
Michael Folkson
<p>I am looking at a <a href="https://github.com/bitcoin/bitcoin/issues?q=is%3Aopen%20is%3Aissue%20label%3A%22good%20first%20issue%22" rel="nofollow noreferrer">good first issue</a> on the Bitcoin Core repo to find and replace a string. But it appears I need to write a <a href="https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#scripted-diffs" rel="nofollow noreferrer">scripted-diff</a> and the examples look complicated. What is the point of the scripted diff? Why is it required for such a simple change?</p>
<p>This question was asked by prayank23 on GitHub and has been paraphrased.</p>

<bitcoin-core-development><bitcoincore-review>
Why do some Bitcoin Core "good first issues" require scripted-diffs?
Michael Folkson
# Why do some Bitcoin Core "good first issues" require scripted-diffs?

(Asked by: username_0 on 2020-09-13)

I am looking at a [good first issue](https://github.com/bitcoin/bitcoin/issues?q=is%3Aopen%20is%3Aissue%20label%3A%22good%20first%20issue%22) on the Bitcoin Core repo to find and replace a string. But it appears I need to write a [scripted-diff](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#scripted-diffs) 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.

**Tags:** bitcoin-core-development, bitcoincore-review


---

## 1 answers

### Answer by username_0 on 2020-09-13. Score: 4 | Accepted answer

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.


---

