]> git.ipfire.org Git - thirdparty/git.git/commit - config.c
config: make parsing stack struct independent from actual data source
authorHeiko Voigt <hvoigt@hvoigt.net>
Thu, 11 Jul 2013 22:44:39 +0000 (00:44 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 12 Jul 2013 16:34:57 +0000 (09:34 -0700)
commit4d8dd1494e9f3af2e9738edaca40ada096f7bf10
tree1baed31fe774d5ebc4c9c6013a0c11cf7ff9c538
parentdbb9a8125542be4d57bc71b6d5baf81c7409a68b
config: make parsing stack struct independent from actual data source

To simplify adding other sources we extract all functions needed for
parsing into a list of callbacks. We implement those callbacks for the
current file parsing. A new source can implement its own set of callbacks.

Instead of storing the concrete FILE pointer for parsing we store a void
pointer. A new source can use this to store its custom data.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.c