builtin/commit.c: remove the PATH_MAX limitation via dynamic allocation
authorElia Pinto <gitter.spiros@gmail.com>
Fri, 13 Jan 2017 17:58:00 +0000 (17:58 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 13 Jan 2017 19:22:18 +0000 (11:22 -0800)
commit8d7aa4ba6a00b3ff69261e88b4842c0df5662125
tree058246c75637359eb2ab765ae9f767cae09a0a46
parentd7dffce1cebde29a0c4b309a79e4345450bf352a
builtin/commit.c: remove the PATH_MAX limitation via dynamic allocation

Remove the PATH_MAX limitation from the environment setting that
points to a filename by switching to dynamic allocation.

As a side effect of this change, we also reduce the snprintf()
calls, that may silently truncate results if the programmer is not
careful.

Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/commit.c