Thread (59 messages) 59 messages, 5 authors, 2021-06-01

[PATCH 11/15] push: fix Yoda condition

STALE1952d

From: Felipe Contreras <hidden>
Date: 2021-05-29 07:45:28
Subsystem: the rest · Maintainer: Linus Torvalds

Revision v2 of 2 in this series.

Revisions (2)
  1. v1 [diff vs current]
  2. v2 current
We want to check if remote is the same as the branch remote, not the
other way around.

Signed-off-by: Felipe Contreras <redacted>
---
 builtin/push.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/push.c b/builtin/push.c
index 7485522807..468ccc1067 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -204,7 +204,7 @@ static const char *get_upstream_ref(struct branch *branch, const char *remote_na
 
 static int is_workflow_triangular(struct remote *remote)
 {
-	return remote_get(NULL) != remote;
+	return remote != remote_get(NULL);
 }
 
 static void setup_default_push_refspecs(struct remote *remote)
-- 
2.32.0.rc0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help