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

Gatla Vishweshwar Reddy <[email protected]>
Newsgroups org.kernel.vger.git
Message-ID <[email protected]>
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.