push: return immediately in trivial switch case

There's no need to break when nothing else will be executed.

Will help next patches.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Felipe Contreras 2021-05-31 14:51:13 -05:00 committed by Junio C Hamano
parent 533e0325ab
commit 72739680fc

View File

@ -257,25 +257,25 @@ static void setup_default_push_refspecs(struct remote *remote)
default:
case PUSH_DEFAULT_MATCHING:
refspec_append(&rs, ":");
break;
return;
case PUSH_DEFAULT_UNSPECIFIED:
case PUSH_DEFAULT_SIMPLE:
setup_push_simple(remote, branch, same_remote);
break;
return;
case PUSH_DEFAULT_UPSTREAM:
setup_push_upstream(remote, branch, same_remote);
break;
return;
case PUSH_DEFAULT_CURRENT:
setup_push_current(remote, branch);
break;
return;
case PUSH_DEFAULT_NOTHING:
die(_("You didn't specify any refspecs to push, and "
"push.default is \"nothing\"."));
break;
return;
}
}