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

Re: [PATCH v4] read-cache: use istate->repo for trace2 logging

From
Derrick Stolee <stolee@gmail.com>
Date
Apr 2, 2026, 14:26 UTC
Message-ID
<fbf03f6a-c746-4b6b-81fb-f3eb4b2e2f0e@gmail.com>
In-Reply-To
<xmqqpl4ldqyi.fsf@gitster.g>
On 3/30/26 4:04 PM, Junio C Hamano wrote:
Show 28 quoted lines
> "Jayesh Daga via GitGitGadget" <gitgitgadget@gmail.com> writes:
> 
>> From: Jayesh Daga <jayeshdaga99@gmail.com>
>>
>> trace2 calls in read-cache.c use the global 'the_repository',
>> even though the relevant index_state provides an explicit
>> repository pointer via 'istate->repo'.
>>
>> Using the global repository can result in incorrect trace2
>> output when multiple repository instances are in use, as
>> events may be attributed to the wrong repository.
>>
>> Use 'istate->repo' instead to ensure correct repository
>> attribution.
>>
>> Signed-off-by: Jayesh Daga <jayeshdaga99@gmail.com>
>> ---
>> Range-diff vs v3:
>>
>>   1:  5a8165b05d < -:  ---------- repo: add paths.git_dir repo info key
>>   2:  9bb6d0fa01 = 1:  c99d731efa read-cache: use istate->repo for trace2 logging
> 
> A range-diff with v2 would have been much more relevant, but the
> patch below looks super boring compared to v2 which is very good.
> Just replacing the_repository with istate->repo and nothing else,
> which is exactly we expect to see from the patch title above ;-)
> 
> Will queue.  Thanks.

Thanks for putting in the work to create this complete commit. LGTM.

-Stolee
Previous: Junio C HamanoNext: Jayesh Daga
Message 13 of 14 in “read-cache: use index state repository for trace2 logging”
  1. read-cache: use index state repository for trace2 loggingJayesh Daga via GitGitGadget, Mar 27, 2026
  2. Derrick StoleeMar 27, 2026
  3. Junio C HamanoMar 27, 2026
  4. jayesh0104Mar 28, 2026
  5. read-cache: use istate->repo for trace2 loggingJayesh Daga via GitGitGadget, Mar 28, 2026
  6. Junio C HamanoMar 28, 2026
  7. Derrick StoleeMar 29, 2026
  8. 0/2 [GSoC] read-cache: use index state repository for trace2 loggingJayesh Daga via GitGitGadget, Mar 30, 2026
  9. 1/2 repo: add paths.git_dir repo info keyjayesh0104 via GitGitGadget, Mar 30, 2026
  10. 2/2 read-cache: use istate->repo for trace2 loggingJayesh Daga via GitGitGadget, Mar 30, 2026
  11. read-cache: use istate->repo for trace2 loggingJayesh Daga via GitGitGadget, Mar 30, 2026
  12. Junio C HamanoMar 30, 2026
  13. Derrick StoleeApr 2, 2026
  14. Jayesh DagaApr 2, 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.