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

2013-05-15 Thread Jiang Xin
2013/5/15 Junio C Hamano gits...@pobox.com: Jiang Xin worldhello@gmail.com 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,

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

2013-05-15 Thread Junio C Hamano
Jiang Xin worldhello@gmail.com 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