Commit Diff


commit - 912a3f7945204384e4aa755c41dd4e89a855ef38
commit + f08eaca092150217800d58a98ee47b078ef8689b
blob - db321a515c3fb30904d91781a67ae7dd6d1b462c
blob + f1fe63531f72a34ed515e9fb73cfe9c8c377d1b9
--- 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
 		;