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

Re: [PATCH v10] show-branch: convert per-branch flags to commit-slab

From
GRGatla Vishweshwar Reddy <gatlavishweshwarreddy26@gmail.com>
Date
Jul 23, 2026, 21:33 UTC
Message-ID
<20260723213316.89081-1-gatlavishweshwarreddy26@gmail.com>
In-Reply-To
<xmqqo6fxe8rf.fsf@gitster.g>
> We are removing this initialization. Why? Have we changed the
> API to make BSS initialization sufficient? Does the updated
> code no longer use this structure? Do we initialize it
> somewhere else now?

The init_commit_name_slab() call was removed by mistake in v7 when I restructured the initialization order. I moved the slab initialization for rev_flags_slab to after ref collection, and accidentally dropped the name_slab initialization entirely in the process. The API has not changed — BSS initialization is not sufficient because slab_size remains 0, causing division by zero when commit_to_name() tries to compute which slab page contains a commit's data using c->index / s->slab_size. The structure is still used throughout — name_commits(), name_commit(), name_parent() all call commit_to_name(). It is not initialized anywhere else. It was a plain mistake that I should have caught by running ./git show-branch master before sending.

> Firing off a new iteration before there is a rough consensus
> on what it should look like is a total waste of everyone's time.

Understood. I will not send another version until I answer every question through discussion first.

> If you can resurrect and continue the chat session with the
> AI agent that spawned the v9 patch, ask it why it decided
> to delete that init_commit_name_slab() call.

The deletion happened when I restructured the initialization block in v7 — moving flags_stride and init_commit_rev_flags_with_stride to after ref collection. The name_slab init was in the same block and got dropped in the process. The AI did not flag it as significant because it was focused on the rev_flags_slab changes. I did not catch it because I did not run the binary. Both failures — the AI not flagging it and me not running it — are my failures to own.

Please ask me any questions you need answered to be satisfied this is a human-understood patch. I will answer each and move this patch forward.

Vishweshwar
Previous: Junio C HamanoNext: Gatla Vishweshwar Reddy
Message 26 of 27 in “show-branch: convert object.flags usage to a commit-slab”
  1. show-branch: convert object.flags usage to a commit-slabGatla Vishweshwar Reddy, Jul 14, 2026
  2. show-branch: convert object.flags to commit-slab with uint64_tGatla Vishweshwar Reddy, Jul 14, 2026
  3. Junio C HamanoJul 14, 2026
  4. Jeff KingJul 14, 2026
  5. show-branch: convert per-branch flags to commit-slabGatla Vishweshwar Reddy, Jul 15, 2026
  6. Junio C HamanoJul 15, 2026
  7. show-branch: convert per-branch flags to commit-slabGatla Vishweshwar Reddy, Jul 15, 2026
  8. Patrick SteinhardtJul 15, 2026
  9. Junio C HamanoJul 15, 2026
  10. show-branch: convert per-branch flags to commit-slabGatla Vishweshwar Reddy, Jul 15, 2026
  11. Junio C HamanoJul 15, 2026
  12. show-branch: convert per-branch flags to commit-slabGatla Vishweshwar Reddy, Jul 15, 2026
  13. Junio C HamanoJul 17, 2026
  14. show-branch: convert per-branch flags to commit-slabGatla Vishweshwar Reddy, Jul 17, 2026
  15. Patrick SteinhardtJul 17, 2026
  16. Patrick SteinhardtJul 17, 2026
  17. Gatla Vishweshwar ReddyJul 17, 2026
  18. Patrick SteinhardtJul 17, 2026
  19. Junio C HamanoJul 17, 2026
  20. show-branch: convert per-branch flags to commit-slabGatla Vishweshwar Reddy, Jul 17, 2026
  21. Junio C HamanoJul 17, 2026
  22. show-branch: convert per-branch flags to commit-slabGatla Vishweshwar Reddy, Jul 17, 2026
  23. Junio C HamanoJul 21, 2026
  24. show-branch: convert per-branch flags to commit-slabGatla Vishweshwar Reddy, Jul 21, 2026
  25. Junio C HamanoJul 23, 2026
  26. Gatla Vishweshwar ReddyJul 23, 2026
  27. Gatla Vishweshwar ReddyJul 24, 2026

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.