The current tutorial on Creating a Patch File demonstrates how to create a patch file named patch.diff.
Such a generic name is not good practice - R Core developers end up with lots of files named patch.diff and it makes it harder for them to review patches.
The recommendation from R Core is to include the bug number plus one or two words indicating what the patch is about, e.g. 16629-infinite-recursion.diff.
We should update the tutorial to give this advice and update the example to use a name matching best practice (the name will need to be edited by readers when they create their own patch).
I suggest switching echo $PATCHDIR/patch.diff to ls $PATCHDIR so there is only one part of the code that the user will need to edit when following the tutorial.