[PATCH 06/11] push: merge current and simple

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



`current` is basically the same as `simple` except always assuming we
are in a triangular workflow.

Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
---
 builtin/push.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/builtin/push.c b/builtin/push.c
index 0961826269..2d6358f776 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -210,13 +210,6 @@ static void setup_push_upstream(struct remote *remote, struct branch *branch,
 	refspec_appendf(&rs, "%s:%s", branch->refname, branch->merge[0]->src);
 }
 
-static void setup_push_current(struct remote *remote, struct branch *branch)
-{
-	if (!branch)
-		die(_(message_detached_head_die), remote->name);
-	refspec_appendf(&rs, "%s:%s", branch->refname, branch->refname);
-}
-
 static void setup_push_simple(struct remote *remote, struct branch *branch, int triangular)
 {
 	if (!branch)
@@ -269,7 +262,7 @@ static void setup_default_push_refspecs(struct remote *remote)
 		break;
 
 	case PUSH_DEFAULT_CURRENT:
-		setup_push_current(remote, branch);
+		setup_push_simple(remote, branch, 1);
 		break;
 
 	case PUSH_DEFAULT_NOTHING:
-- 
2.32.0.rc0




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux