Re: [PATCH] pathspec: rename free_pathspec() to clear_pathspec()

2016-06-02 Thread Junio C Hamano
Jeff King writes: > I think diff_filespec_clear() would not be quite right. It is freeing > only the allocated _data_, but leaving the other portions intact. You are (as usual) more right than I am ;-) Yes, the free_data() is designed to retain enough information about the filespec so that the

Re: [PATCH] pathspec: rename free_pathspec() to clear_pathspec()

2016-06-02 Thread Jeff King
On Thu, Jun 02, 2016 at 02:18:47PM -0700, Junio C Hamano wrote: > The function takes a pointer to a pathspec structure, and releases > the resources held by it, but does not free() the structure itself. > Such a function should be called "clear", not "free". Hmm, makes sense, though... > * This

[PATCH] pathspec: rename free_pathspec() to clear_pathspec()

2016-06-02 Thread Junio C Hamano
The function takes a pointer to a pathspec structure, and releases the resources held by it, but does not free() the structure itself. Such a function should be called "clear", not "free". Signed-off-by: Junio C Hamano --- * This is just something I noticed. Among the hits in $ git grep f