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:32:36 +0300
committerJunio C Hamano <gitster@pobox.com>2021-06-02 04:09:52 +0300
commit7e6d72bb111b080ef37e26fbdfe080672521c570 (patch)
treea8776ad3dda048892dd2a33e92f8b92ff9286619 /builtin/push.c
parentb8e8b98647f02e721fc3c1b5db6936ba7c1c1167 (diff)
push: remove unused code in setup_push_upstream()
Now it's not used for the simple mode. 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, 2 insertions, 8 deletions
diff --git a/builtin/push.c b/builtin/push.c
index e37c751268..29fea70ff1 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -186,7 +186,7 @@ static const char message_detached_head_die[] =
" git push %s HEAD:<name-of-remote-branch>\n");
static void setup_push_upstream(struct remote *remote, struct branch *branch,
- int same_remote, int simple)
+ int same_remote)
{
if (!branch)
die(_(message_detached_head_die), remote->name);
@@ -207,12 +207,6 @@ static void setup_push_upstream(struct remote *remote, struct branch *branch,
"to update which remote branch."),
remote->name, branch->name);
- if (simple) {
- /* Additional safety */
- if (strcmp(branch->refname, branch->merge[0]->src))
- die_push_simple(branch, remote);
- }
-
refspec_appendf(&rs, "%s:%s", branch->refname, branch->merge[0]->src);
}
@@ -271,7 +265,7 @@ static void setup_default_push_refspecs(struct remote *remote)
break;
case PUSH_DEFAULT_UPSTREAM:
- setup_push_upstream(remote, branch, same_remote, 0);
+ setup_push_upstream(remote, branch, same_remote);
break;
case PUSH_DEFAULT_CURRENT: