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

[PATCH v3 0/5] Fixes for Documentation/MyFirstObjectWalk.txt

From
Dirk Gouders <dirk@gouders.net>
Date
Mar 25, 2024, 12:33 UTC
Message-ID
<cover.1711368498.git.dirk@gouders.net>
In-Reply-To
<cover.1710840596.git.dirk@gouders.net>
The 3rd iteration for this series.
I tried to credit Kyle's suggestions for 4 and 5 with Helped-by tags and
hope it was adequate to do so.  Actually, at least #4 was a lot more
than a Helped-by, I would say...
---
Changes in v3:
* Reword the description in [4/5]
* Add a missing slash in [5/5]
Changes in v2:
* Added Emily to Cc in the hope for a review
* Remove superfluous tags from [1/5] and [3/5]
* Replace bashism `|&` by `2>&1 |` in [5/5]
---
Dirk Gouders (5):
  MyFirstObjectWalk: use additional arg in config_fn_t
  MyFirstObjectWalk: fix misspelled "builtins/"
  MyFirstObjectWalk: fix filtered object walk
  MyFirstObjectWalk: fix description for counting omitted objects
  MyFirstObjectWalk: add stderr to pipe processing
 Documentation/MyFirstObjectWalk.txt | 36 ++++++++++++++++-------------
 1 file changed, 20 insertions(+), 16 deletions(-)
Range-diff against v2:
-:  ---------- > 1:  0eeb4b78ac MyFirstObjectWalk: use additional arg in config_fn_t
-:  ---------- > 2:  3122ae2472 MyFirstObjectWalk: fix misspelled "builtins/"
-:  ---------- > 3:  f21348ab80 MyFirstObjectWalk: fix filtered object walk
1:  4219237868 ! 4:  cfa4b9ce50 MyFirstObjectWalk: fix description for counting omitted objects
    @@ Commit message
         Fix the text to clarify that we now use another traversal function to
         be able to pass the pointer to the introduced oidset.
     
    +    Helped-by: Kyle Lippincott <spectral@google.com>
         Signed-off-by: Dirk Gouders <dirk@gouders.net>
     
      ## Documentation/MyFirstObjectWalk.txt ##
    @@ Documentation/MyFirstObjectWalk.txt: points to the same tree object as its grand
     -`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.
    ++filter, like with `git log --filter=<spec> --filter-print-omitted`. To do this,
    ++change `traverse_commit_list()` to `traverse_commit_list_filtered()`, which is
    ++able to populate an `omitted` list. Note that this means that our object walk
    ++will 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:
      
    @@ Documentation/MyFirstObjectWalk.txt: 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:
    ++Replace the call to `traverse_commit_list()` with
    ++`traverse_commit_list_filtered()` and pass a pointer to the `omitted` oidset
    ++defined and initialized above:
      
      ----
      	...
2:  9b0f0832b7 ! 5:  c571abb49d MyFirstObjectWalk: add stderr to pipe processing
    @@ Commit message
         Fix this by redirecting stderr to stdout prior to the pipe operator
         to additionally connect stderr to stdin of the latter command.
     
    +    Further, while reviewing the above fix, Kyle Lippincott noticed
    +    a second issue with the second of the examples: a missing slash in the
    +    executable path "./bin-wrappers git".
    +
    +    Add the missing slash.
    +
    +    Helped-by: Kyle Lippincott <spectral@google.com>
         Signed-off-by: Dirk Gouders <dirk@gouders.net>
     
      ## Documentation/MyFirstObjectWalk.txt ##
    @@ Documentation/MyFirstObjectWalk.txt: of the first handful:
      ----
      $ make
     -$ GIT_TRACE=1 ./bin-wrappers git walken | tail -n 10
    -+$ GIT_TRACE=1 ./bin-wrappers git walken 2>&1 | tail -n 10
    ++$ GIT_TRACE=1 ./bin-wrappers/git walken 2>&1 | tail -n 10
      ----
      
      The last commit object given should have the same OID as the one we saw at the
-- 
2.43.0
Previous: Junio C HamanoNext: Dirk Gouders
Message 15 of 49 in “Fixes for Documentation/MyFirstObjectWalk.txt”
  1. 0/5 Fixes for Documentation/MyFirstObjectWalk.txtDirk Gouders, Mar 19, 2024
  2. 1/5 MyFirstObjectWalk: use additional arg in config_fn_tDirk Gouders, Mar 19, 2024
  3. Kyle LippincottMar 23, 2024
  4. 2/5 MyFirstObjectWalk: fix misspelled "builtins/"Dirk Gouders, Mar 19, 2024
  5. 3/5 MyFirstObjectWalk: fix filtered object walkDirk Gouders, Mar 19, 2024
  6. 4/5 MyFirstObjectWalk: fix description for counting omitted objectsDirk Gouders, Mar 19, 2024
  7. Kyle LippincottMar 23, 2024
  8. Dirk GoudersMar 23, 2024
  9. 5/5 MyFirstObjectWalk: add stderr to pipe processingDirk Gouders, Mar 19, 2024
  10. Kyle LippincottMar 23, 2024
  11. Dirk GoudersMar 23, 2024
  12. Kyle LippincottMar 23, 2024
  13. Dirk GoudersMar 23, 2024
  14. Junio C HamanoMar 24, 2024
  15. 0/5 Fixes for Documentation/MyFirstObjectWalk.txtDirk Gouders, Mar 25, 2024
  16. 2/5 MyFirstObjectWalk: fix misspelled "builtins/"Dirk Gouders, Mar 25, 2024
  17. 3/5 MyFirstObjectWalk: fix filtered object walkDirk Gouders, Mar 25, 2024
  18. 4/5 MyFirstObjectWalk: fix description for counting omitted objectsDirk Gouders, Mar 25, 2024
  19. Junio C HamanoMar 25, 2024
  20. Dirk GoudersMar 25, 2024
  21. Junio C HamanoMar 25, 2024
  22. Kyle LippincottMar 25, 2024
  23. 5/5 MyFirstObjectWalk: add stderr to pipe processingDirk Gouders, Mar 25, 2024
  24. 1/5 MyFirstObjectWalk: use additional arg in config_fn_tDirk Gouders, Mar 25, 2024
  25. Junio C HamanoMar 25, 2024
  26. Dirk GoudersMar 25, 2024
  27. Kyle LippincottMar 25, 2024
  28. Dirk GoudersMar 25, 2024
  29. Junio C HamanoMar 25, 2024
  30. Kyle LippincottMar 25, 2024
  31. Dirk GoudersMar 25, 2024
  32. 0/5 Fixes for Documentation/MyFirstObjectWalk.txtDirk Gouders, Mar 26, 2024
  33. Kyle LippincottMar 27, 2024
  34. Dirk GoudersMar 27, 2024
  35. 0/5 Fixes for Documentation/MyFirstObjectWalk.txtDirk Gouders, Mar 27, 2024
  36. 1/5 MyFirstObjectWalk: use additional arg in config_fn_tDirk Gouders, Mar 27, 2024
  37. 2/5 MyFirstObjectWalk: fix misspelled "builtins/"Dirk Gouders, Mar 27, 2024
  38. 3/5 MyFirstObjectWalk: fix filtered object walkDirk Gouders, Mar 27, 2024
  39. 4/5 MyFirstObjectWalk: fix description for counting omitted objectsDirk Gouders, Mar 27, 2024
  40. 5/5 MyFirstObjectWalk: add stderr to pipe processingDirk Gouders, Mar 27, 2024
  41. 1/5 MyFirstObjectWalk: use additional arg in config_fn_tDirk Gouders, Mar 26, 2024
  42. 2/5 MyFirstObjectWalk: fix misspelled "builtins/"Dirk Gouders, Mar 26, 2024
  43. 3/5 MyFirstObjectWalk: fix filtered object walkDirk Gouders, Mar 26, 2024
  44. 4/5 MyFirstObjectWalk: fix description for counting omitted objectsDirk Gouders, Mar 26, 2024
  45. Junio C HamanoMar 26, 2024
  46. Dirk GoudersMar 26, 2024
  47. Junio C HamanoMar 26, 2024
  48. Dirk GoudersMar 27, 2024
  49. 5/5 MyFirstObjectWalk: add stderr to pipe processingDirk Gouders, Mar 26, 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.