Re: [RFC 0/2] refactor relative_path in path.c

2013-05-15 Thread Junio C Hamano
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 prefi

[RFC 0/2] refactor relative_path in path.c

2013-05-15 Thread Jiang Xin
2013/5/15 Junio C Hamano : > Jiang Xin writes: > >> +/* >> + * Give path as relative to prefix. >> + * >> + * This function is a combination of path_relative (in quote.c) and >> + * relative_path (in path.c) >> + */ >> +static const char *path_relative(const char *in, const char *prefix) >> +{ >>