Re: [PATCH v2 02/21] path.c: rename vsnpath() to git_vsnpath()
- From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
- Date
- Dec 15, 2013, 21:13 UTC
- Message-ID
- <52AE1B5E.6020506@ramsay1.demon.co.uk>
- In-Reply-To
- <CACsJy8BdLt8ZUU2z4LAgTcfXUjruFaOFsvrv6dSziZVizAopGA@mail.gmail.com>
On 15/12/13 02:25, Duy Nguyen wrote:
Show 30 quoted lines
> On Sun, Dec 15, 2013 at 3:23 AM, Ramsay Jones
> <ramsay@ramsay1.demon.co.uk> wrote:
>> On 14/12/13 10:54, Nguyễn Thái Ngọc Duy wrote:
>>> This is the underlying implementation of git_path(), git_pathdup() and
>>> git_snpath() which will prefix $GIT_DIR in the result string. Put git_
>>> prefix in front of it to avoid the confusion that this is a generic
>>> path handling function.#
>>>
>>> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
>>> ---
>>> path.c | 8 ++++----
>>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/path.c b/path.c
>>> index 4c1c144..06863b7 100644
>>> --- a/path.c
>>> +++ b/path.c
>>> @@ -50,7 +50,7 @@ char *mksnpath(char *buf, size_t n, const char *fmt, ...)
>>> return cleanup_path(buf);
>>> }
>>>
>>> -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 ;-) ).
ATB, Ramsay Jones