Download raw body.
Fix empty send/fetch blocks
On Fri, Aug 27, 2021 at 11:53:23AM -0600, Tracey Emery wrote:
> Simple fix for empty send {} and fetch {} blocks. Stops the parser from
> complaining.
>
> Ok?
Great! Ok
> --
>
> Tracey Emery
>
> diff cfd923335bc72b12508df8bafe2f19ea43ddd4ad /home/tracey/src/got
> blob - e12f2c34c3e5addd43b684bada46247e724ecf1d
> file + libexec/got-read-gotconfig/parse.y
> --- libexec/got-read-gotconfig/parse.y
> +++ libexec/got-read-gotconfig/parse.y
> @@ -239,7 +239,8 @@ remoteopts1 : REPOSITORY STRING {
> fetchopts2 : fetchopts2 fetchopts1 nl
> | fetchopts1 optnl
> ;
> -fetchopts1 : REPOSITORY STRING {
> +fetchopts1 : /* empty */
> + | REPOSITORY STRING {
> remote->fetch_repo->fetch_repository = strdup($2);
> if (remote->fetch_repo->fetch_repository == NULL) {
> free($2);
> @@ -290,7 +291,8 @@ fetch : {
> sendopts2 : sendopts2 sendopts1 nl
> | sendopts1 optnl
> ;
> -sendopts1 : REPOSITORY STRING {
> +sendopts1 : /* empty */
> + | REPOSITORY STRING {
> remote->send_repo->send_repository = strdup($2);
> if (remote->send_repo->send_repository == NULL) {
> free($2);
>
>
Fix empty send/fetch blocks