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

[PATCH 4/5] MyFirstObjectWalk: fix description for counting omitted objects

From
Dirk Gouders <dirk@gouders.net>
Date
Mar 11, 2024, 13:29 UTC
Message-ID
<637070dd48ceefc5c2b7a902dd5eb3ecde503894.1710192973.git.dirk@gouders.net>
In-Reply-To
<cover.1710192973.git.dirk@gouders.net>

Before the changes to count omitted objects, the function traverse_commit_list() was used and its call cannot be changed to pass a pointer to an oidset to record omitted objects.

Fix the text to clarify that we now use another traversal function to be able to pass the pointer to the introduced oidset.

Signed-off-by: Dirk Gouders <dirk@gouders.net>
---
 Documentation/MyFirstObjectWalk.txt | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/Documentation/MyFirstObjectWalk.txt b/Documentation/MyFirstObjectWalk.txt
index a06c712e46..981dbf917b 100644
--- a/Documentation/MyFirstObjectWalk.txt
+++ b/Documentation/MyFirstObjectWalk.txt
@@ -754,10 +754,11 @@ points to the same tree object as its grandparent.)
 === Counting Omitted Objects
 
 We also have the capability to enumerate all objects which were omitted by a
-filter, like with `git log --filter=<spec> --filter-print-omitted`. Asking
-`traverse_commit_list_filtered()` to populate the `omitted` list means that our
-object walk does not perform any better than an unfiltered object walk; all
-reachable objects are walked in order to populate the list.
+filter, like with `git log --filter=<spec> --filter-print-omitted`. We
+can ask `traverse_commit_list_filtered()` to populate the `omitted`
+list which means that our object walk does not perform any better than
+an unfiltered object walk; all reachable objects are walked in order
+to populate the list.
 
 First, add the `struct oidset` and related items we will use to iterate it:
 
@@ -778,8 +779,9 @@ static void walken_object_walk(
 	...
 ----
 
-Modify the call to `traverse_commit_list_filtered()` to include your `omitted`
-object:
+You need to replace the call to `traverse_commit_list()` to
+`traverse_commit_list_filtered()` to be able to pass a pointer to the
+oidset defined and initialized above:
 
 ----
 	...
-- 
2.43.0
Previous: Dirk GoudersNext: Dirk Gouders
Message 6 of 11 in “Fixes for Documentation/MyFirstObjectWalk.txt”
  1. 0/5 Fixes for Documentation/MyFirstObjectWalk.txtDirk Gouders, Mar 11, 2024
  2. 1/5 MyFirstObjectWalk: use additional arg in config_fn_tDirk Gouders, Mar 11, 2024
  3. Junio C HamanoMar 12, 2024
  4. 2/5 MyFirstObjectWalk: fix misspelled "builtins/"Dirk Gouders, Mar 11, 2024
  5. 3/5 MyFirstObjectWalk: fix filtered object walkDirk Gouders, Mar 11, 2024
  6. 4/5 MyFirstObjectWalk: fix description for counting omitted objectsDirk Gouders, Mar 11, 2024
  7. 5/5 MyFirstObjectWalk: add stderr to pipe processingDirk Gouders, Mar 11, 2024
  8. Junio C HamanoMar 12, 2024
  9. Dirk GoudersMar 12, 2024
  10. Junio C HamanoMar 12, 2024
  11. Junio C HamanoMar 12, 2024

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.