config: introduce an optional event stream while parsing
commit8032cc4462b8af268fe457c2a0431473334dfd18
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Mon, 9 Apr 2018 08:32:05 +0000 (9 10:32 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Apr 2018 12:32:59 +0000 (9 21:32 +0900)
tree031f988e41677259d7e0014831f23da2cb3819c5
parentb73bdc34c06358359750a896983a2ea85b694ca0
config: introduce an optional event stream while parsing

This extends our config parser so that it can optionally produce an event
stream via callback function, where it reports e.g. when a comment was
parsed, or a section header, etc.

This parser will be used subsequently to handle the scenarios better where
removing config entries would make sections empty, or where a new entry
could be added to an already-existing, empty section.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.c
config.h