[prev in list] [next in list] [prev in thread] [next in thread]
List: git
Subject: [PATCH v2 05/13] push: only get the branch when needed
From: Felipe Contreras <felipe.contreras () gmail ! com>
Date: 2021-05-31 19:51:16
Message-ID: 20210531195124.218325-6-felipe.contreras () gmail ! com
[Download RAW message or body]
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
builtin/push.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/builtin/push.c b/builtin/push.c
index 8fcbd2878d..d9f9d20f39 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -243,7 +243,7 @@ static int is_same_remote(struct remote *remote)
static void setup_default_push_refspecs(struct remote *remote)
{
- struct branch *branch = branch_get(NULL);
+ struct branch *branch;
int same_remote = is_same_remote(remote);
switch (push_default) {
@@ -259,6 +259,7 @@ static void setup_default_push_refspecs(struct remote *remote)
break;
}
+ branch = branch_get(NULL);
if (!branch)
die(_(message_detached_head_die), remote->name);
--
2.32.0.rc0
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic