From: Junio C Hamano Date: Wed, 15 May 2013 18:24:15 GMT Subject: Re: [RFC 0/2] refactor relative_path in path.c Message-ID: <7vli7gaypc.fsf@alter.siamese.dyndns.org> In-Reply-To: Jiang Xin writes: > These two patches enhance relative_path() in path.c, so that function > relative_path() will return real relative path, not a path strip off > the prefix. > > The 2nd patch is a bit aggressive, it refactor all related functions, > remove unnecessary arguments: len and/or prefix_len. I did not particularly find the second one "aggressive"; it would have been much more pleasant to review if the "drop unused 'len'" part were made into a separate patch [3/2] as a follow-up, though. It is a bit sad that relative_path() in [1/2] uses a single static and fixed sized buffer. How is the new implementation making sure the expanded result does not overflow the buf[]?