Junio C Hamano <gitster@xxxxxxxxx> writes: > > @@ -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@xxxxxxxxxx/