Re: [PATCH v2 1/4] config: factor out config file stack management

2013-03-13 Thread Heiko Voigt
On Tue, Mar 12, 2013 at 03:04:56PM -0400, Jeff King wrote: > On Tue, Mar 12, 2013 at 04:44:35PM +0100, Heiko Voigt wrote: > > > > Can we throw in a comment at the top here with the expected usage? In > > > particular, do_config_from is expecting the caller to have filled in > > > certain fields (a

Re: [PATCH v2 1/4] config: factor out config file stack management

2013-03-12 Thread Jeff King
On Tue, Mar 12, 2013 at 04:44:35PM +0100, Heiko Voigt wrote: > > Can we throw in a comment at the top here with the expected usage? In > > particular, do_config_from is expecting the caller to have filled in > > certain fields (at this point, top->f and top->name), but there is > > nothing to make

Re: [PATCH v2 1/4] config: factor out config file stack management

2013-03-12 Thread Heiko Voigt
On Tue, Mar 12, 2013 at 06:52:00AM -0400, Jeff King wrote: > On Sun, Mar 10, 2013 at 05:57:53PM +0100, Heiko Voigt wrote: > > > Because a config callback may start parsing a new file, the > > global context regarding the current config file is stored > > as a stack. Currently we only need to manag

Re: [PATCH v2 1/4] config: factor out config file stack management

2013-03-12 Thread Jeff King
On Sun, Mar 10, 2013 at 05:57:53PM +0100, Heiko Voigt wrote: > Because a config callback may start parsing a new file, the > global context regarding the current config file is stored > as a stack. Currently we only need to manage that stack from > git_config_from_file. Let's factor it out to allo

[PATCH v2 1/4] config: factor out config file stack management

2013-03-10 Thread Heiko Voigt
Because a config callback may start parsing a new file, the global context regarding the current config file is stored as a stack. Currently we only need to manage that stack from git_config_from_file. Let's factor it out to allow new sources of config data. Signed-off-by: Heiko Voigt --- config