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

Re: [PATCH 0/8] commit-graph: drop CHECK_OIDS, peel in callers

From
Derrick Stolee <stolee@gmail.com>
Date
May 5, 2020, 11:35 UTC
Message-ID
<bc41469c-a55a-49a4-5e2e-096bbdd52751@gmail.com>
In-Reply-To
<cover.1588641176.git.me@ttaylorr.com>
On 5/4/2020 9:13 PM, Taylor Blau wrote:
> Hi,
> 
> These are a few patches to address [1]
We seem to be missing links [1] and [2].
Show 17 quoted lines
>   - It is often convenient to pipe the output of 'git for-each-ref' into
>     'git commit-graph write --stdin-commits', but handling multi-layer
>     tags is frustrating (at the very least, you have to peel them
>     yourself in 'for-each-ref', incurring a higher-than-necessary cost
>     outside of the commit-graph invocation)
> 
>   - It would be much more convenient if 'git commit-graph write
>     --stdin-commits' ignored OIDs that peel down to non-commit objects
>     silently, while still warning the caller about objects that (a)
>     don't exist, or (b) invalid hash inputs (for e.g., "HEAD", or
>     "refs/heads/foo").
> 
>   - By making this change, we are allowing *more* possible behaviors
>     than in previous versions, and the only case that we are breaking
>     (that 'git commit-graph write --stdin-commits' complains on
>     non-commit OIDs) can be addressed by peeling outside of
>     'commit-graph write' [2].

I agree that these are worthy goals. If someone was _depending_ on the "git commit-graph write" command to _fail_, then they chose a strange way to discover a ref that points to a non-commit.

Show 10 quoted lines
> The first six patches move peeling refs out from the commit-graph
> internals, and into the callers.
> 
> This has no impact on the '--stdin-commits' case, but is a potential
> improvement for '--reachable', where it is more efficient to call
> 'peel_ref()' than 'lookup_commit_reference_gently()'. There is an
> intermediate state (that is resolved in the final patch) where we can
> have more than one progress meter (since the progress meter moved with
> the perhaps-expensive operations out of the commit-graph internals,
> too), but the final patch addresses this.

Interesting. I'll be sure to look carefully at this progress handling as this has potential to lose our progress options. I expect that you were careful about this.

Show 8 quoted lines
> The last two patches lift the restriction on input to '--stdin-commits'
> resolving to commit objects, instead making the behavior to silently
> drop non-commit OIDs, and continue complain about invalid OIDs, and
> valid-but-missing OIDs.
> 
> Finally, this topic isn't based on anything that isn't already in
> 'master', so I think the days of many tangle commit-graph topics are
> behind us.
Woo!
-Stolee
Previous: Taylor BlauNext: Taylor Blau
Message 26 of 59 in “commit-graph: drop CHECK_OIDS, peel in callers”
  1. 0/8 commit-graph: drop CHECK_OIDS, peel in callersTaylor Blau, May 5, 2020
  2. 1/8 commit-graph.c: extract 'refs_cb_data'Taylor Blau, May 5, 2020
  3. 2/8 commit-graph.c: show progress of finding reachable commitsTaylor Blau, May 5, 2020
  4. Derrick StoleeMay 5, 2020
  5. Taylor BlauMay 5, 2020
  6. 3/8 commit-graph.c: peel refs in 'add_ref_to_set'Taylor Blau, May 5, 2020
  7. Jeff KingMay 7, 2020
  8. Taylor BlauMay 13, 2020
  9. Jeff KingMay 13, 2020
  10. 4/8 builtin/commit-graph.c: extract 'read_one_commit()'Taylor Blau, May 5, 2020
  11. Jeff KingMay 7, 2020
  12. Taylor BlauMay 13, 2020
  13. 5/8 builtin/commit-graph.c: dereference tags in builtinTaylor Blau, May 5, 2020
  14. Derrick StoleeMay 5, 2020
  15. Taylor BlauMay 5, 2020
  16. Jeff KingMay 7, 2020
  17. 6/8 commit-graph.c: simplify 'fill_oids_from_commits'Taylor Blau, May 5, 2020
  18. Derrick StoleeMay 5, 2020
  19. Jeff KingMay 7, 2020
  20. 7/8 t5318: reorder test below 'graph_read_expect'Taylor Blau, May 5, 2020
  21. 8/8 commit-graph: drop COMMIT_GRAPH_WRITE_CHECK_OIDS flagTaylor Blau, May 5, 2020
  22. Derrick StoleeMay 5, 2020
  23. Taylor BlauMay 5, 2020
  24. Jeff KingMay 7, 2020
  25. Taylor BlauMay 13, 2020
  26. Derrick StoleeMay 5, 2020
  27. Taylor BlauMay 5, 2020
  28. 0/8 commit-graph: drop CHECK_OIDS, peel in callersTaylor Blau, May 6, 2020
  29. 1/8 commit-graph.c: extract 'refs_cb_data'Taylor Blau, May 6, 2020
  30. 2/8 commit-graph.c: show progress of finding reachable commitsTaylor Blau, May 6, 2020
  31. 3/8 commit-graph.c: peel refs in 'add_ref_to_set'Taylor Blau, May 6, 2020
  32. 4/8 builtin/commit-graph.c: extract 'read_one_commit()'Taylor Blau, May 6, 2020
  33. 5/8 builtin/commit-graph.c: dereference tags in builtinTaylor Blau, May 6, 2020
  34. 6/8 commit-graph.c: simplify 'fill_oids_from_commits'Taylor Blau, May 6, 2020
  35. 7/8 t5318: reorder test below 'graph_read_expect'Taylor Blau, May 6, 2020
  36. 8/8 commit-graph: drop COMMIT_GRAPH_WRITE_CHECK_OIDS flagTaylor Blau, May 6, 2020
  37. Jeff KingMay 7, 2020
  38. 0/8 commit-graph: drop CHECK_OIDS, peel in callersTaylor Blau, May 13, 2020
  39. 1/8 commit-graph.c: extract 'refs_cb_data'Taylor Blau, May 13, 2020
  40. 2/8 commit-graph.c: show progress of finding reachable commitsTaylor Blau, May 13, 2020
  41. 3/8 commit-graph.c: peel refs in 'add_ref_to_set'Taylor Blau, May 13, 2020
  42. 4/8 builtin/commit-graph.c: extract 'read_one_commit()'Taylor Blau, May 13, 2020
  43. Jeff KingMay 14, 2020
  44. Taylor BlauMay 14, 2020
  45. Junio C HamanoMay 14, 2020
  46. Taylor BlauMay 18, 2020
  47. 5/8 builtin/commit-graph.c: dereference tags in builtinTaylor Blau, May 13, 2020
  48. Jeff KingMay 14, 2020
  49. Taylor BlauMay 14, 2020
  50. commit-graph: fix "Collecting commits from input" progress lineSZEDER Gábor, Jul 10, 2020
  51. Taylor BlauJul 10, 2020
  52. SZEDER GáborJul 15, 2020
  53. Derrick StoleeJul 15, 2020
  54. Junio C HamanoJul 15, 2020
  55. 6/8 commit-graph.c: simplify 'fill_oids_from_commits'Taylor Blau, May 13, 2020
  56. 7/8 t5318: reorder test below 'graph_read_expect'Taylor Blau, May 13, 2020
  57. 8/8 commit-graph: drop COMMIT_GRAPH_WRITE_CHECK_OIDS flagTaylor Blau, May 13, 2020
  58. Jeff KingMay 14, 2020
  59. Jeff KingMay 14, 2020

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.