Re: [RFC/WIP PATCH 1/3] teach config parsing to read from strbuf

2013-02-25 Thread Jeff King
On Mon, Feb 25, 2013 at 02:04:18AM +0100, Heiko Voigt wrote: > This can be used to read configuration values directly from gits > database. > > Signed-off-by: Heiko Voigt FWIW, I implemented something quite similar as a 2-patch series here: http://article.gmane.org/gmane.comp.version-control

Re: [RFC/WIP PATCH 1/3] teach config parsing to read from strbuf

2013-02-25 Thread Heiko Voigt
Hi Junio, On Sun, Feb 24, 2013 at 09:54:43PM -0800, Junio C Hamano wrote: > Heiko Voigt writes: > > > diff --git a/config.c b/config.c > > index aefd80b..f995e98 100644 > > --- a/config.c > > +++ b/config.c > > @@ -13,6 +13,9 @@ > > typedef struct config_file { > > struct config_file *prev;

Re: [RFC/WIP PATCH 1/3] teach config parsing to read from strbuf

2013-02-24 Thread Junio C Hamano
Heiko Voigt writes: > diff --git a/config.c b/config.c > index aefd80b..f995e98 100644 > --- a/config.c > +++ b/config.c > @@ -13,6 +13,9 @@ > typedef struct config_file { > struct config_file *prev; > FILE *f; > + int is_strbuf; > + struct strbuf *strbuf_contents; > + in

[RFC/WIP PATCH 1/3] teach config parsing to read from strbuf

2013-02-24 Thread Heiko Voigt
This can be used to read configuration values directly from gits database. Signed-off-by: Heiko Voigt --- .gitignore | 1 + Makefile | 1 + cache.h| 1 + config.c | 119 ++--- t/t1300-repo-c