Thread (7 messages) flat view 7 messages, 2 authors, 2021-08-12
STALE1830d

Revision v2 of 2 in this series.

Revisions (2)
  1. v2 current
  2. v3 [diff vs current]

[PATCH v2 1/1] list-objects.c: rename "traverse_trees_and_blobs" to "traverse_non_commits"

From: Teng Long <hidden>
Date: 2021-08-12 08:47:37
Subsystem: the rest · Maintainer: Linus Torvalds

Function `traverse_trees_and_blobs` not only works on trees and blobs,
but also on tags, the function name is somewhat misleading. This commit
rename it to `traverse_non_commits`.

Signed-off-by: Teng Long <redacted>
---
 list-objects.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/list-objects.c b/list-objects.c
index 7f404677d5..edaf1f5d64 100644
--- a/list-objects.c
+++ b/list-objects.c
@@ -334,7 +334,7 @@ static void add_pending_tree(struct rev_info *revs, struct tree *tree)
 	add_pending_object(revs, &tree->object, "");
 }
 
-static void traverse_trees_and_blobs(struct traversal_context *ctx,
+static void traverse_non_commits(struct traversal_context *ctx,
 				     struct strbuf *base)
 {
 	int i;
@@ -407,9 +407,9 @@ static void do_traverse(struct traversal_context *ctx)
 			 * needs a reallocation for each commit. Can we pass the
 			 * tree directory without allocation churn?
 			 */
-			traverse_trees_and_blobs(ctx, &csp);
+			traverse_non_commits(ctx, &csp);
 	}
-	traverse_trees_and_blobs(ctx, &csp);
+	traverse_non_commits(ctx, &csp);
 	strbuf_release(&csp);
 }
 
-- 
2.32.0.1.g4c9ac18d93.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help