Re: [PATCH 2/3] push: fail early with detached HEAD and current
Here: put this at the end of the series and autosquash.
-- 8< --
From: Ramkumar Ramachandra <artagnon@gmail.com>
Date: Thu, 30 May 2013 01:29:59 +0530
Subject: [PATCH] fixup! HEAD~2
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
builtin/push.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/builtin/push.c b/builtin/push.c
index d819487..2d84d10 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -175,7 +175,7 @@ static void
warn_unspecified_push_default_configuration(void)
static void setup_default_push_refspecs(struct remote *remote)
{
- struct branch *branch = branch_get(NULL);
+ struct branch *branch;
switch (push_default) {
default:
@@ -196,6 +196,7 @@ static void setup_default_push_refspecs(struct
remote *remote)
break;
case PUSH_DEFAULT_CURRENT:
+ branch = branch_get(NULL);
if (!branch)
die(_(message_detached_head_die), remote->name);
add_refspec(branch->name);
--
1.8.3.12.gbd56588