Thread (16 messages) 16 messages, 3 authors, 2024-05-07

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

From: James Liu <hidden>
Date: 2024-05-06 01:16:04

On Fri May 3, 2024 at 4:28 PM AEST, Patrick Steinhardt wrote:
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 <redacted>
---
 refs.c | 198 ---------------------------------------------------------
 refs.h |  72 +--------------------
 2 files changed, 2 insertions(+), 268 deletions(-)
This is very cool, Coccinelle is a TIL for me.
quoted hunk ↗ jump to hunk
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help