Instructions for creating patches

Ryan Schmidt ryandesign at macports.org
Sun May 6 10:12:08 UTC 2018


On May 4, 2018, at 17:33, Rainer Müller wrote:

> On 2018-05-03 09:14, Zero King wrote:
>> On Thu, May 03, 2018 at 08:51:49AM +0200, Mojca Miklavec wrote:
>>> On 1 May 2018 at 16:11, Rainer Müller wrote:
>>>> 
>>>> The guide uses "Portfile-rrdtool.diff" as an example filename [1]. Some
>>>> users seem to take that literally and submit patches with that name.
>>>> 
>>>> [1] https://guide.macports.org/#development.patches.portfile
>>> 
>>> Looking at this part of the guide, I would suggest that we change the
>>> instructions. It almost definitely makes more sense to use "git diff
>>> ..." instead of "diff ...", but more importantly we probably want to
>>> suggest creating a pull request at that point anyway.
>> 
>> Some contributors would edit the Portfile in
>> /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/,
>> which isn't a git repository and `git diff` won't work for them.
> 
> If users edit the ports tree directly there is no way to diff at all

Sure there is. The user just has to copy the portfile before making changes. The above-referenced guide section shows how to do that.

> and
> the changes will be lost on the next sync. They should never do that.

There is nothing wrong with doing that, if the user is ok with losing the changes on the next sync. I've certainly used that method before.


It's certainly fine if we want to change the documentation to show how to PR instead, provided we have complete, correct, and easy-to-understand documentation about how to do that, in one and only one place (the guide).




More information about the macports-dev mailing list