Download raw body.
Send/Fetch plumbing in parser
On Fri, Aug 27, 2021 at 09:49:22AM -0600, Tracey Emery wrote: > Hello, > > This implements the parsing code needed to add fetch and send to > got.conf. I did not update the man page, since the fetch/send code > hasn't been written yet. > > Ok? > +fetch : { > + static const struct got_error* error; > + > + error = new_fetch(&remote->fetch_repo); What will happen if there are two or more fetch {} blocks in the file? Will data parsed from a previous block be overwritten and its memory leaked? Should this code check for remote->fetch_repo != NULL and raise a syntax error if data for a fetch block has already been stored? Or is this being handled elsewhere somehow? Same question applies to handling of the send {} block further below. > + if (error) { > + yyerror("%s", error->msg); > + YYERROR; > + }
Send/Fetch plumbing in parser