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

Re: [PATCH 5/5] refs: remove functions without ref store

From
James Liu <james@jamesliu.io>
Date
May 6, 2024, 01:15 UTC
Message-ID
<D125XHSBVOV4.3H49JX3P4UFIM@jamesliu.io>
In-Reply-To
<47eb6aee922b1e17caa76b2e7366d9bdf26aa6e1.1714717057.git.ps@pks.im>
On Fri May 3, 2024 at 4:28 PM AEST, Patrick Steinhardt wrote:
Show 10 quoted lines
> The preceding commit has rewritten all callers of ref-related functions
> to use the equivalents that accept a `struct ref_store`. Consequently,
> the respective variants without the ref store are now unused. Remove
> them.
>
> Signed-off-by: Patrick Steinhardt <ps@pks.im>
> ---
>  refs.c | 198 ---------------------------------------------------------
>  refs.h |  72 +--------------------
>  2 files changed, 2 insertions(+), 268 deletions(-)
This is very cool, Coccinelle is a TIL for me.
Show 19 quoted lines
> @@ -560,17 +519,7 @@ int refs_for_each_reflog_ent_reverse(struct ref_store *refs,
>  				     void *cb_data);
>  
>  /*
> - * Iterate over reflog entries in the log for `refname` in the main ref store.
> - */
> -
> -/* oldest entry first */
> -int for_each_reflog_ent(const char *refname, each_reflog_ent_fn fn, void *cb_data);
> -
> -/* youngest entry first */
> -int for_each_reflog_ent_reverse(const char *refname, each_reflog_ent_fn fn, void *cb_data);
> -
> -/*
> - * The signature for the callback function for the {refs_,}for_each_reflog()
> + * The signature for the callback function for the refs_for_each_reflog()
>   * functions below. The memory pointed to by the refname argument is only
>   * guaranteed to be valid for the duration of a single callback invocation.
>   */

`s/functions below/function below` since the non-namespaced variant has now been removed.

Cheers, James

Previous: Patrick SteinhardtNext: Junio C Hamano
Message 12 of 32 in “refs: remove functions without ref store”
  1. 0/5 refs: remove functions without ref storePatrick Steinhardt, May 3, 2024
  2. 1/5 refs: introduce missing functions that accept a `struct ref_store`Patrick Steinhardt, May 3, 2024
  3. Junio C HamanoMay 3, 2024
  4. 2/5 refs: add `exclude_patterns` parameter to `for_each_fullref_in()`Patrick Steinhardt, May 3, 2024
  5. Taylor BlauMay 3, 2024
  6. 3/5 cocci: introduce rules to transform "refs" to pass ref storePatrick Steinhardt, May 3, 2024
  7. 4/5 cocci: apply rules to rewrite callers of "refs" interfacesPatrick Steinhardt, May 3, 2024
  8. Taylor BlauMay 3, 2024
  9. Junio C HamanoMay 3, 2024
  10. Patrick SteinhardtMay 6, 2024
  11. 5/5 refs: remove functions without ref storePatrick Steinhardt, May 3, 2024
  12. James LiuMay 6, 2024
  13. Junio C HamanoMay 3, 2024
  14. Jeff KingMay 3, 2024
  15. Junio C HamanoMay 3, 2024
  16. Patrick SteinhardtMay 6, 2024
  17. Junio C HamanoMay 6, 2024
  18. Patrick SteinhardtMay 7, 2024
  19. Junio C HamanoMay 7, 2024
  20. Patrick SteinhardtMay 7, 2024
  21. Junio C HamanoMay 7, 2024
  22. Jeff KingMay 9, 2024
  23. Patrick SteinhardtMay 10, 2024
  24. Taylor BlauMay 3, 2024
  25. Junio C HamanoMay 3, 2024
  26. 0/5 refs: remove functions without ref storePatrick Steinhardt, May 7, 2024
  27. 1/5 refs: introduce missing functions that accept a `struct ref_store`Patrick Steinhardt, May 7, 2024
  28. 2/5 refs: add `exclude_patterns` parameter to `for_each_fullref_in()`Patrick Steinhardt, May 7, 2024
  29. 3/5 cocci: introduce rules to transform "refs" to pass ref storePatrick Steinhardt, May 7, 2024
  30. 4/5 cocci: apply rules to rewrite callers of "refs" interfacesPatrick Steinhardt, May 7, 2024
  31. 5/5 refs: remove functions without ref storePatrick Steinhardt, May 7, 2024
  32. Taylor BlauMay 7, 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.