[darcs-users] How to name patches

Wolfgang Jeltsch g9ks157k at acme.softbase.org
Tue Feb 21 22:28:29 UTC 2017


Am Samstag, den 18.02.2017, 00:01 +0100 schrieb Lele Gaifax:
> Hi Wolfgang,
> 
> I really doubt there will ever be a general agreement on how one
> should name the patches in an arbitrary repository. As you say, the
> best is to be consistent within a *single* repository. It is just a
> matter of style and taste, there's no one style "more right" than
> another one.
> 
> > I often see names like “add README file”
>
> This is my own preference, that I try to follow in all my projects. It
> is effective and terse, and right to the point IMO: in my mental
> model, feeding such a patch to darcs will cause the appearence of that
> file. […]
> 
> Another example is
> 
>   Fix issue XYZ
>
> As explained in the bugtracker, issue XYZ caused some headache. This  
> patch solves the problem changing this and that, so no more analgesic,
> hopefully.

This makes actually some sense to me now. If you think of a patch as
being (or describing) a function that turns file trees into file trees,
the patch name describes the “action” that this function is “performing”
on file trees. The Haskell standard libraries partly use this naming
approach for actual functions, with names like insert and delete,
despite the fact that this naming is based on imperative thinking.

I used to use names like “added README file” for the most part, but I am
thinking now about switching to using names like “add README file”.
There is some sense in this naming convention, contrary to what I
thought before, and it seems to be much more common. So using it would
make it easier to keep the naming consistent even within a single
repository, as sometimes outsiders contribute patches.

> Hope this helps,

Oh yes, it did. ☺ Thank you.

> ciao, lele.

All the best,
Wolfgang


More information about the darcs-users mailing list