[PATCH v3 09/10] abspath: convert absolute_path() to strbuf

2014-07-28 Thread René Scharfe
Move most of the code of absolute_path() into the new function strbuf_add_absolute_path() and in the process transform it to use struct strbuf and xgetcwd() instead of a PATH_MAX-sized buffer, which can be too small on some file systems. Signed-off-by: Rene Scharfe l@web.de ---

Re: [PATCH v3 09/10] abspath: convert absolute_path() to strbuf

2014-07-28 Thread Jeff King
On Mon, Jul 28, 2014 at 08:33:55PM +0200, René Scharfe wrote: const char *absolute_path(const char *path) { - static char buf[PATH_MAX + 1]; - - if (!*path) { - die(The empty string is not a valid path); - } else if (is_absolute_path(path)) { - if

Re: [PATCH v3 09/10] abspath: convert absolute_path() to strbuf

2014-07-28 Thread René Scharfe
Am 28.07.2014 um 21:15 schrieb Jeff King: On Mon, Jul 28, 2014 at 08:33:55PM +0200, René Scharfe wrote: const char *absolute_path(const char *path) { - static char buf[PATH_MAX + 1]; - - if (!*path) { - die(The empty string is not a valid path); - } else if