@@ -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:
`current` is basically the same as `simple` except always assuming we are in a triangular workflow. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> --- builtin/push.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)