pretty.c: make git_pretty_formats_config return -1 on git_config_string failure
commita26bc613a64ac2c7ee69a50675e61b004a26382d
authorTanay Abhra <tanayabh@gmail.com>
Mon, 4 Aug 2014 14:41:15 +0000 (4 07:41 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 4 Aug 2014 19:12:25 +0000 (4 12:12 -0700)
tree16eb05b8b6b7257133b8a08a990ce1dfc1893331
parentd31f3ad23dd1aee3c3e1015a43b02b995c01a9a1
pretty.c: make git_pretty_formats_config return -1 on git_config_string failure

`git_pretty_formats_config()` continues without checking git_config_string's
return value which can lead to a SEGFAULT. Instead return -1 when
git_config_string fails signalling `git_config()` to die printing the location
of the erroneous variable.

Signed-off-by: Tanay Abhra <tanayabh@gmail.com>
Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pretty.c