Skip to content

Commit 7088ce7

Browse files
felipecgitster
authored andcommitted
push: don't get a full remote object
All we need to know is that their names are the same. Additionally this might be easier to parse for some since remote_for_branch is more descriptive than remote_get(NULL). Signed-off-by: Felipe Contreras <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e0c91cf commit 7088ce7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/push.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ static void setup_default_push_refspecs(struct remote *remote)
226226
die(_(message_detached_head_die), remote->name);
227227

228228
dst = branch->refname;
229-
same_remote = remote == remote_get(NULL);
229+
same_remote = !strcmp(remote->name, remote_for_branch(branch, NULL));
230230

231231
switch (push_default) {
232232
default:

0 commit comments

Comments
 (0)