Re: [PATCH 2/3] push: fail early with detached HEAD and current

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

 



Here: put this at the end of the series and autosquash.

-- 8< --
From: Ramkumar Ramachandra <artagnon@xxxxxxxxx>
Date: Thu, 30 May 2013 01:29:59 +0530
Subject: [PATCH] fixup! HEAD~2

Signed-off-by: Ramkumar Ramachandra <artagnon@xxxxxxxxx>
---
 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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]