Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 1/7] config.c: fix accuracy of line number in errors

From: Matthieu Moy <hidden>
Date: 2016-06-15 23:02:01

Tanay Abhra [off-list ref] writes:
On 7/25/2014 12:01 AM, Junio C Hamano wrote:
quoted
Tanay Abhra [off-list ref] writes:
quoted
On 7/24/2014 3:19 AM, Junio C Hamano wrote:
quoted
Tanay Abhra [off-list ref] writes:
quoted
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.

Discovered-by: Tanay Abhra [off-list ref]
Signed-off-by: Matthieu Moy <redacted>
This patch should have looked like,

From: Matthieu Moy <redacted>

<commit message>

Commit-message-by: Tanay Abhra [off-list ref]
Yes, the code itself was mine, and Tanay wrote the commit message.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help