diff mbox series

[v7,02/28] refs: document reflog_expire_fn's flag argument

Message ID 554bb1ac3aed066eb578a305b7fe76f1660f6153.1618832277.git.gitgitgadget@gmail.com (mailing list archive)
State New, archived
Headers show
Series reftable library | expand

Commit Message

Han-Wen Nienhuys April 19, 2021, 11:37 a.m. UTC
From: Han-Wen Nienhuys <hanwen@google.com>

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
---
 refs/refs-internal.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Junio C Hamano April 20, 2021, 7:34 p.m. UTC | #1
"Han-Wen Nienhuys via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Han-Wen Nienhuys <hanwen@google.com>
>
> Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
> ---
>  refs/refs-internal.h | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/refs/refs-internal.h b/refs/refs-internal.h
> index 546a6b965dcc..a31c1f465beb 100644
> --- a/refs/refs-internal.h
> +++ b/refs/refs-internal.h
> @@ -592,6 +592,10 @@ typedef int reflog_exists_fn(struct ref_store *ref_store, const char *refname);
>  typedef int create_reflog_fn(struct ref_store *ref_store, const char *refname,
>  			     int force_create, struct strbuf *err);
>  typedef int delete_reflog_fn(struct ref_store *ref_store, const char *refname);
> +
> +/*
> + * `flags` accepts a bitmask of `expire_reflog_flags`.
> + */

OK.  It would have been better to say what expire_reflog_flags is
(i.e. `enum expire_reflog_flags`), though.

>  typedef int reflog_expire_fn(struct ref_store *ref_store,
>  			     const char *refname, const struct object_id *oid,
>  			     unsigned int flags,
Han-Wen Nienhuys April 27, 2021, 3:21 p.m. UTC | #2
On Tue, Apr 20, 2021 at 9:34 PM Junio C Hamano <gitster@pobox.com> wrote:> > +/*
> > + * `flags` accepts a bitmask of `expire_reflog_flags`.
> > + */
>
> OK.  It would have been better to say what expire_reflog_flags is
> (i.e. `enum expire_reflog_flags`), though.

Done, in the last version.
diff mbox series

Patch

diff --git a/refs/refs-internal.h b/refs/refs-internal.h
index 546a6b965dcc..a31c1f465beb 100644
--- a/refs/refs-internal.h
+++ b/refs/refs-internal.h
@@ -592,6 +592,10 @@  typedef int reflog_exists_fn(struct ref_store *ref_store, const char *refname);
 typedef int create_reflog_fn(struct ref_store *ref_store, const char *refname,
 			     int force_create, struct strbuf *err);
 typedef int delete_reflog_fn(struct ref_store *ref_store, const char *refname);
+
+/*
+ * `flags` accepts a bitmask of `expire_reflog_flags`.
+ */
 typedef int reflog_expire_fn(struct ref_store *ref_store,
 			     const char *refname, const struct object_id *oid,
 			     unsigned int flags,