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

Re: [PATCH 03/16] refs: implement releasing ref storages

From
Patrick Steinhardt <ps@pks.im>
Date
May 17, 2024, 07:09 UTC
Message-ID
<ZkcCoY8_S2nSXSyU@tanuki>
In-Reply-To
<xmqqjzjtr602.fsf@gitster.g>
On Thu, May 16, 2024 at 11:01:01AM -0700, Junio C Hamano wrote:
Show 16 quoted lines
> Karthik Nayak <karthik.188@gmail.com> writes:
> 
> >> +static void debug_release(struct ref_store *refs)
> >> +{
> >> +	struct debug_ref_store *drefs = (struct debug_ref_store *)refs;
> >
> > We should probably add a trace here, using `trace_printf_key()`
> 
> A totally ignorant question.  Should we be adding more traces with
> trace_* API instead of trace2_* API?  If the latter aims to cover
> superset of use cases the former did, I was hoping that we can
> eventually deprecate the former, hence this question.  Of course We
> could add a compatiblity layer that emulates trace_* API with a thin
> wrapper around trace2_* API, but if we do not add new callers, it
> may still be feasible to directly migrate the callers to use trace2_
> API without having to invent such compatibility wrappers.

I cannot really answer this question as I ain't got much of a clue around the tracing APIs. But in this case I think we should indeed add this via `trace_printf_key()` so that we remain consistent with all the other wrappers in the debug store. I'd argue that either all functions here should use trace or trace2, but not a mixture.

Patrick
Previous: Junio C HamanoNext: Patrick Steinhardt
Message 11 of 33 in “refs: drop all references to `the_repository`”
  1. 00/16 refs: drop all references to `the_repository`Patrick Steinhardt, May 16, 2024
  2. 01/16 refs: adjust names for `init` and `init_db` callbacksPatrick Steinhardt, May 16, 2024
  3. Karthik NayakMay 16, 2024
  4. 02/16 refs: rename `init_db` callback to avoid confusionPatrick Steinhardt, May 16, 2024
  5. Karthik NayakMay 16, 2024
  6. Junio C HamanoMay 16, 2024
  7. Patrick SteinhardtMay 17, 2024
  8. 03/16 refs: implement releasing ref storagesPatrick Steinhardt, May 16, 2024
  9. Karthik NayakMay 16, 2024
  10. Junio C HamanoMay 16, 2024
  11. Patrick SteinhardtMay 17, 2024
  12. Patrick SteinhardtMay 17, 2024
  13. 04/16 refs: track ref stores via strmapPatrick Steinhardt, May 16, 2024
  14. Junio C HamanoMay 16, 2024
  15. 05/16 refs: pass repo when retrieving submodule ref storePatrick Steinhardt, May 16, 2024
  16. Junio C HamanoMay 16, 2024
  17. Patrick SteinhardtMay 17, 2024
  18. 06/16 refs: refactor `resolve_gitlink_ref()` to accept a repositoryPatrick Steinhardt, May 16, 2024
  19. Junio C HamanoMay 16, 2024
  20. 07/16 refs: retrieve worktree ref stores via associated repositoryPatrick Steinhardt, May 16, 2024
  21. 08/16 refs: convert iteration over replace refs to accept ref storePatrick Steinhardt, May 16, 2024
  22. 09/16 refs: pass ref store when detecting dangling symrefsPatrick Steinhardt, May 16, 2024
  23. 10/16 refs: move object peeling into "object.c"Patrick Steinhardt, May 16, 2024
  24. Junio C HamanoMay 16, 2024
  25. 11/16 refs: pass repo when peeling objectsPatrick Steinhardt, May 16, 2024
  26. 12/16 refs: drop `git_default_branch_name()`Patrick Steinhardt, May 16, 2024
  27. Karthik NayakMay 16, 2024
  28. 13/16 refs: remove `dwim_log()`Patrick Steinhardt, May 16, 2024
  29. 14/16 refs/files: use correct repositoryPatrick Steinhardt, May 16, 2024
  30. 15/16 refs/files: remove references to `the_hash_algo`Patrick Steinhardt, May 16, 2024
  31. 16/16 refs/packed: remove references to `the_hash_algo`Patrick Steinhardt, May 16, 2024
  32. Karthik NayakMay 16, 2024
  33. Patrick SteinhardtMay 17, 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.