From: Nguyen Thai Ngoc Duy Date: Thu, 11 Oct 2012 13:04:05 GMT Subject: Re: [PATCH 1/3] quote: let caller reset buffer for quote_path_relative() Message-ID: In-Reply-To: <7vd30qav4m.fsf@alter.siamese.dyndns.org> 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 really does. > > How should this interact with the logic in the called function that > used to say "if we ended up returning an empty string because the > path is the same as the base, we should give ./ back", and what > should the return value of this function be? > ... > So what does it mean to have an existing string in the output buffer > when calling the function? Is it supposed to be a path to a > directory, or just a general uninterpreted string (e.g. a message)? I prefer the KISS principle in this case: do not interpret existing string. -- Duy