Re: [PATCH v2 22/27] struct ref_update: Rename field "ref_name" to "refname"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/01/2014 09:53 PM, Junio C Hamano wrote:
> Michael Haggerty <mhagger@xxxxxxxxxxxx> writes:
> 
>> This is consistent with the usual nomenclature.
> 
> I am of two minds.
> 
> Looking for "\(\.\|->\)ref_name" used to ignore refname fields of
> other structures and let us focus on the ref_update structure.  Yes,
> there is the ref_lock structure that shares ref_name to contaminate
> such a grep output already, but this change makes the output even
> more noisy, as you have to now look for "\(\.\|->\)refname" which
> would give you more hits from other unrelated structures.
> 
> On the other hand, I do not like to name this to "update_refname" or
> some nonsense like that, of course. A reference name field in a
> "ref_update" structure shouldn't have to say that it is about
> updating in its name; it should be known from the name of the
> structure it appears in.
> 
> So I dunno.

I prefer naming consistency but whatever.

When I want to find all users of a common identifier, I usually rename
the identifier at its declaration (e.g., to "refnameXXX") and see where
gcc flags errors.  Or if I'm doing a lot of this sort of thing, I might
even fire up Eclipse, which does a pretty good job of finding instances
of a particular identifier throughout the code.

Michael

-- 
Michael Haggerty
mhagger@xxxxxxxxxxxx
http://softwareswirl.blogspot.com/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]