Thread (24 messages) 24 messages, 3 authors, 2021-05-29
STALE1836d
Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 09/11] push: remove trivial function

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

It's a single line that is used in a single place, and the variable has
the same name as the function.

Signed-off-by: Felipe Contreras <redacted>
---
 builtin/push.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/builtin/push.c b/builtin/push.c
index 2dda1724cc..8ecfbe8d63 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -235,15 +235,10 @@ static void setup_push_simple(struct remote *remote, struct branch *branch, int
 	refspec_appendf(&rs, "%s:%s", branch->refname, branch->refname);
 }
 
-static int is_workflow_triangular(struct remote *remote)
-{
-	return remote != remote_get(NULL);
-}
-
 static void setup_default_push_refspecs(struct remote *remote)
 {
 	struct branch *branch = branch_get(NULL);
-	int triangular = is_workflow_triangular(remote);
+	int triangular = remote != remote_get(NULL);
 
 	switch (push_default) {
 	default:
-- 
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