diff mbox series

[08/11] push: fix Yoda condition

Message ID 20210528201014.2175179-9-felipe.contreras@gmail.com (mailing list archive)
State Superseded
Headers show
Series Unconvolutize push.default=simple | expand

Commit Message

Felipe Contreras May 28, 2021, 8:10 p.m. UTC
We want to check if remote is the same as the branch remote, not the
other way around.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 builtin/push.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/builtin/push.c b/builtin/push.c
index f008cd624f..2dda1724cc 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -237,7 +237,7 @@  static void setup_push_simple(struct remote *remote, struct branch *branch, int
 
 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)