[Mesa-dev] [PATCH v3] Rename the _mesa_lookup_enum_by_nr() function Renamed function _mesa_lookup_prim_by_nr() to _mesa_prim_string() _mesa_lookup_enum_by_nr() to _mesa_enum_string() _mesa_lookup_enum_by_name() to _mesa_enum_value() Changes were made, because nobody liked the way these functions are called.
Arnas Milaševičius
mla at arnas.me
Wed Jun 5 15:02:21 PDT 2013
And how should I deal with the files, which has all the 3 functions in
them? Should I add them in one of the 3 patches or should I add them in all
the 3 patches?
On Thu, Jun 6, 2013 at 12:24 AM, Kenneth Graunke <kenneth at whitecape.org>wrote:
> This patch is really doing three related, but independent things:
> 1. Renaming _mesa_lookup_prim_by_nr() to _mesa_prim_string()
> 2. Renaming _mesa_lookup_enum_by_nr() to _mesa_enum_string()
> 3. Renaming _mesa_lookup_enum_by_name() to _mesa_enum_value()
>
> Generally, a patch should only do one thing at a time. This has a number
> of benefits:
> - Patches are smaller and easier for people to review.
> - If a reviewer doesn't like the way you did something (for example,
> prefers a different name), you can redo and resubmit that one part instead
> of the whole thing. This is less work for you and also easier on reviewers.
> - If something breaks, people tracking it down via 'git bisect' will find
> a small, specific change that caused the problem rather than a large change
> that does many things.
> - Small patches are easier to revert, if there is something broken.
>
> I realize this is a bit pedantic for this particular patch, but I'd still
> prefer to see it as three separate patches:
>
> mesa: Rename _mesa_lookup_prim_by_nr() to _mesa_prim_string().
> mesa: Rename _mesa_lookup_enum_by_nr() to _mesa_enum_string().
> mesa: Rename _mesa_lookup_enum_by_name() to _mesa_enum_value().
>
> You'll also notice that our commit titles start with a prefix for the
> particular area of code they touch. For example, src/glsl starts with
> "glsl: ", src/drivers/dri/i965 starts with "i965: ", and src/mesa/main (or
> generally anything not fitting a specific category) starts with "mesa: ".
> If you're not sure what prefix to use, run 'git log' on a file to see what
> other people have done.
>
> --Ken
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130606/59e2e61e/attachment.html>
More information about the mesa-dev
mailing list