Re: [PATCH v2 2/4] config: report config parse errors using cb
- From
- Jonathan Tan <jonathantanmy@google.com>
- Date
- Aug 24, 2023, 17:31 UTC
- Message-ID
- <20230824173136.2252024-1-jonathantanmy@google.com>
- In-Reply-To
- <xmqqttspck4a.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 18 quoted lines
> > @@ -1035,8 +1088,6 @@ static int git_parse_source(struct config_source *cs, config_fn_t fn, > > int comment = 0; > > size_t baselen = 0; > > struct strbuf *var = &cs->var; > > ... > > + /* > > + * FIXME for whatever reason, do_event passes the _previous_ event, so > > + * in order for our callback to receive the error event, we have to call > > + * do_event twice > > + */ > > + do_event(cs, CONFIG_EVENT_ERROR, &event_data); > > + do_event(cs, CONFIG_EVENT_ERROR, &event_data); > > + return -1; > > } > > This indeed is very curious and needs to be looked into before we > proceed further. How does the current control flow cope with the > behaviour?
I plan to look at this more fully later, but about this, I wrote about this in a reply to the previous version: https://lore.kernel.org/git/20230804213457.1174493-1-jonathantanmy@google.com/