config: provide access to the current line number
authorBert Wesarg <bert.wesarg@googlemail.com>
Mon, 27 Jan 2020 07:04:31 +0000 (08:04 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Feb 2020 18:52:10 +0000 (10:52 -0800)
commitf2a2327a4a6a9bccade6df2bed1fdc3a8ab37f4c
tree4fe82fc9fa6fd1366d7ffa392be73e633a252a45
parent923d4a5ca4f86c19247ef436e6d03d261ebce904
config: provide access to the current line number

Users are nowadays trained to see message from CLI tools in the form

    <file>:<lno>: …

To be able to give such messages when notifying the user about
configurations in any config file, it is currently only possible to get
the file name (if the value originates from a file to begin with) via
`current_config_name()`. Now it is also possible to query the current line
number for the configuration.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.c
config.h
t/helper/test-config.c
t/t1308-config-set.sh