git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Teng Long <dyroneteng@gmail.com>
Date
Aug 12, 2021, 08:47 UTC
Message-ID
<2d19f0901ccb5ff27842b876cbe1085757a4aacc.1628757762.git.dyroneteng@gmail.com>
In-Reply-To
<cover.1628757762.git.dyroneteng@gmail.com>

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 <dyroneteng@gmail.com>
---
 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
Previous: Teng LongNext: Teng Long
Message 8 of 11 in “traverse_trees_and_blobs: rename and tree-wide”
  1. 0/1 traverse_trees_and_blobs: rename and tree-wideTeng Long, Aug 11, 2021
  2. 1/1 list-objects.c: traverse_trees_and_blobs: rename and tree-wideTeng Long, Aug 11, 2021
  3. Junio C HamanoAug 11, 2021
  4. Jeff KingAug 11, 2021
  5. Teng LongAug 12, 2021
  6. Teng LongAug 12, 2021
  7. 0/1 list-objects.c: rename "traverse_trees_and_blobs" to "traverse_non_commits"Teng Long, Aug 12, 2021
  8. 1/1 list-objects.c: rename "traverse_trees_and_blobs" to "traverse_non_commits"Teng Long, Aug 12, 2021
  9. 0/1 list-objects.c: rename "traverse_trees_and_blobs" to "traverse_non_commits"Teng Long, Aug 12, 2021
  10. 1/1 list-objects.c: rename "traverse_trees_and_blobs" to "traverse_non_commits"Teng Long, Aug 12, 2021
  11. Jeff KingAug 12, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.