Re: [PATCH v2 02/21] path.c: rename vsnpath() to git_vsnpath()
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Dec 16, 2013, 07:21 UTC
- Message-ID
- <CACsJy8AJT5XXyJvVi_6Gjrn=AqA1M9KWY_62p=d3CPjg7nXFWw@mail.gmail.com>
- In-Reply-To
- <52AE1B5E.6020506@ramsay1.demon.co.uk>
On Mon, Dec 16, 2013 at 4:13 AM, Ramsay Jones <ramsay@ramsay1.demon.co.uk> wrote:
Show 11 quoted lines
>>>> -static char *vsnpath(char *buf, size_t n, const char *fmt, va_list args)
>>>> +static char *git_vsnpath(char *buf, size_t n, const char *fmt, va_list args)
>>>
>>> :-D I renamed this _from_ git_vsnpath() in commit 5b3b8fa2 ("path.c: Remove the
>>> 'git_' prefix from a file scope function", 04-09-2012), because ... well it's a
>>> file scope function! (i.e. the git_ prefix implies greater than file scope).
>>> I'm not very good at naming things, so ...
>>
>> maybe gitdir_vsnpath() then to avoid the global scope prefix git_?
>
> Sounds fine to me (but then so does vsnpath ;-) ).OK I go with this. I think it makes sense
vsnpath -> do_git_path
its three callers are
git_vsnpath -> strbuf_git_path (it's updated to take strbuf) git_path git_pathdup
In the end all these functions have "git_path" in them :)
-- Duy