Commit Diff


commit - cfd923335bc72b12508df8bafe2f19ea43ddd4ad
commit + 16c4be8c1cab9456f9dd0468c27f8ab73235737e
blob - e12f2c34c3e5addd43b684bada46247e724ecf1d
blob + 0ee95525d5ee45d435fe9bcb4a126a331e0fd035
--- 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);