author | Martin Stenberg <martin@gnutiken.se> | |
Fri, 9 Mar 2012 21:57:54 +0000 (22:57 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 12 Mar 2012 16:39:06 +0000 (09:39 -0700) | ||
commit | 4b340593551217904d794cc0a8db55db89b5b066 | |
tree | cc73f2727a638a51a40e688008f4d0709b0331c4 | tree | snapshot |
parent | d909e0761c234b28aac77566368c1ee5451a856a | commit | diff |
config: report errors at the EOL with correct line number
A section in a config file with a missing "]" reports the next line
as bad, same goes to a value with a missing end quote.
This happens because the error is not detected until the end of the
line, when line number is already increased. Fix this by decreasing
line number by one for these cases.
Signed-off-by: Martin Stenberg <martin@gnutiken.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
A section in a config file with a missing "]" reports the next line
as bad, same goes to a value with a missing end quote.
This happens because the error is not detected until the end of the
line, when line number is already increased. Fix this by decreasing
line number by one for these cases.
Signed-off-by: Martin Stenberg <martin@gnutiken.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.c | diff | blob | history | |
t/t1300-repo-config.sh | diff | blob | history |