Download raw body.
separate send and fetch config blocks
On Mon, Aug 30, 2021 at 02:36:07PM +0200, Stefan Sperling wrote:
> On Mon, Aug 30, 2021 at 01:33:51PM +0200, Stefan Sperling wrote:
> > There is a related problem in parse.y on the main branch:
> >
> > got-read-gotconfig/parse.y: yacc finds 16 shift/reduce conflicts
> >
> > I don't know what impact this has on the behaviour of the patch below,
> > if any. I will look into this next.
>
> Fixed on the main branch now by reverting the change which introduced
> the warning.
Give this a try.
--
Tracey Emery
diff 92952c0ecd960182cd5822e21126351bff23ad61 /home/tracey/src/got
blob - 842552aef596457405a11618bb92b1586d2d094c
file + libexec/got-read-gotconfig/parse.y
--- libexec/got-read-gotconfig/parse.y
+++ libexec/got-read-gotconfig/parse.y
@@ -245,7 +245,7 @@ remoteopts1 : REPOSITORY STRING {
yyerror("%s", error->msg);
YYERROR;
}
- } '{' optnl fetchopts2 '}'
+ } '{' optnl fetchempty '}'
| SEND {
static const struct got_error* error;
@@ -258,8 +258,11 @@ remoteopts1 : REPOSITORY STRING {
yyerror("%s", error->msg);
YYERROR;
}
- } '{' optnl sendopts2 '}'
+ } '{' optnl sendempty '}'
;
+fetchempty : /* empty */
+ | fetchopts2
+ ;
fetchopts2 : fetchopts2 fetchopts1 nl
| fetchopts1 optnl
;
@@ -297,6 +300,9 @@ fetchopts1 : REPOSITORY STRING {
remote->fetch_config->branch = $2;
}
;
+sendempty : /* empty */
+ | sendopts2
+ ;
sendopts2 : sendopts2 sendopts1 nl
| sendopts1 optnl
;
separate send and fetch config blocks