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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 11, 2012 at 4:13 AM, Junio C Hamano <gitster@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]