Re: [PATCH 1/3] quote: let caller reset buffer for quote_path_relative()

2012-10-11 Thread Junio C Hamano
Nguyen Thai Ngoc Duy writes: > On Thu, Oct 11, 2012 at 4:13 AM, Junio C Hamano wrote: >> This sounds a lot stronger than "let" to me. All existing callers >> that assumed that buf to be emptied by the function now has to clear >> it. "quote: stop resetting output buffer of quote_path_relative(

Re: [PATCH 1/3] quote: let caller reset buffer for quote_path_relative()

2012-10-11 Thread Nguyen Thai Ngoc Duy
On Thu, Oct 11, 2012 at 4:13 AM, Junio C Hamano wrote: > This sounds a lot stronger than "let" to me. All existing callers > that assumed that buf to be emptied by the function now has to clear > it. "quote: stop resetting output buffer of quote_path_relative()" > may better describe what this r

Re: [PATCH 1/3] quote: let caller reset buffer for quote_path_relative()

2012-10-10 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > quote_path_relative() resetting output buffer is sometimes unnecessary > as the buffer has never been used, and some other times makes it > harder for the caller to use (see builtin/grep.c, the caller has to > insert a string after quote_path_relative) > > Move the

[PATCH 1/3] quote: let caller reset buffer for quote_path_relative()

2012-10-10 Thread Nguyễn Thái Ngọc Duy
quote_path_relative() resetting output buffer is sometimes unnecessary as the buffer has never been used, and some other times makes it harder for the caller to use (see builtin/grep.c, the caller has to insert a string after quote_path_relative) Move the buffer reset back to call sites when neces