Re: [PATCH 3/4] create_symref: modernize variable names

2015-12-28 Thread Michael Haggerty
On 12/20/2015 08:29 AM, Jeff King wrote:
> Once upon a time, create_symref() was used only to point
> HEAD at a branch name, and the variable names reflect that
> (e.g., calling the path git_HEAD). However, it is much more
> generic these days (and has been for some time). Let's
> update the variable names to make it easier to follow:
> 
>   - `ref_target` is now just `ref`, matching the declaration
> in `cache.h` (and hopefully making it clear that it is
> the symref itself, and not the target).

I've been trying to name variables that hold reference names "refname"
to distinguish them clearly from other representations of references,
like "struct ref_entry *".

> [...]

Otherwise LGTM.

Michael

-- 
Michael Haggerty
mhag...@alum.mit.edu

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/4] create_symref: modernize variable names

2015-12-28 Thread Jeff King
On Mon, Dec 28, 2015 at 09:20:42AM +0100, Michael Haggerty wrote:

> On 12/20/2015 08:29 AM, Jeff King wrote:
> > Once upon a time, create_symref() was used only to point
> > HEAD at a branch name, and the variable names reflect that
> > (e.g., calling the path git_HEAD). However, it is much more
> > generic these days (and has been for some time). Let's
> > update the variable names to make it easier to follow:
> > 
> >   - `ref_target` is now just `ref`, matching the declaration
> > in `cache.h` (and hopefully making it clear that it is
> > the symref itself, and not the target).
> 
> I've been trying to name variables that hold reference names "refname"
> to distinguish them clearly from other representations of references,
> like "struct ref_entry *".

That makes sense. I've tweaked this patch to use "refname", and carried
through the change to the following patch.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html