Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2021-05-31 22:51:13 +0300
committerJunio C Hamano <gitster@pobox.com>2021-06-02 04:12:01 +0300
commit72739680fc912c6e8dedaf06af4969f8e52ffb4d (patch)
tree6623d0a00a8fa9cc11c491aecb49bc4ac8046a62 /builtin/push.c
parent533e0325abcf51d6b3ff689dfacf8fa95e3b6da1 (diff)
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>
Diffstat (limited to 'builtin/push.c')
-rw-r--r--builtin/push.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/builtin/push.c b/builtin/push.c
index e3e792c69c..0aa1d0f07d 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -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;
}
}