Re: [PATCH v3 01/25] path.c: make get_pathname() return strbuf instead of static buffer

2014-03-03 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: On Thu, Feb 20, 2014 at 6:26 AM, Junio C Hamano gits...@pobox.com wrote: Is there a reason not to do just an equivalent of #define git_pathdup mkpathdup and be done with it? Am I missing something? They have a subtle difference: mkpathdup() calls

Re: [PATCH v3 01/25] path.c: make get_pathname() return strbuf instead of static buffer

2014-02-28 Thread Duy Nguyen
On Thu, Feb 20, 2014 at 6:26 AM, Junio C Hamano gits...@pobox.com wrote: Is there a reason not to do just an equivalent of #define git_pathdup mkpathdup and be done with it? Am I missing something? They have a subtle difference: mkpathdup() calls cleanup_path() while git_pathdup() does

Re: [PATCH v3 01/25] path.c: make get_pathname() return strbuf instead of static buffer

2014-02-19 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: (Only nitpicks during this round of review). -static char *get_pathname(void) +static struct strbuf *get_pathname() static struct strbuf *get_pathname(void) -- To unsubscribe from this list: send the line unsubscribe git in the body of a message

Re: [PATCH v3 01/25] path.c: make get_pathname() return strbuf instead of static buffer

2014-02-19 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: We've been avoiding PATH_MAX whenever possible. This patch makes get_pathname() return a strbuf and updates the callers to take advantage of this. The code is simplified as we no longer need to worry about buffer overflow. Signed-off-by:

[PATCH v3 01/25] path.c: make get_pathname() return strbuf instead of static buffer

2014-02-18 Thread Nguyễn Thái Ngọc Duy
We've been avoiding PATH_MAX whenever possible. This patch makes get_pathname() return a strbuf and updates the callers to take advantage of this. The code is simplified as we no longer need to worry about buffer overflow. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- path.c | 119