config.c: fix accuracy of line number in errors
commitb3b3f60bb672d23b9db1582395a1d29561cb79ef
authorMatthieu Moy <Matthieu.Moy@imag.fr>
Thu, 7 Aug 2014 11:59:13 +0000 (7 04:59 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 7 Aug 2014 18:38:32 +0000 (7 11:38 -0700)
tree9b496986c3aa6a8b9358a30916b7016636349d6d
parent8262aaa2835d71b0cdf44e68712703a452761328
config.c: fix accuracy of line number in errors

If a callback returns a negative value to `git_config*()` family,
they call `die()` while printing the line number and the file name.
Currently the printed line number is off by one, thus printing the
wrong line number.

Make `linenr` point to the line we just parsed during the call
to callback to get accurate line number in error messages.

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