Thread (79 messages) 79 messages, 4 authors, 2024-12-20

Re: [PATCH v2 6/8] refs: introduce the `ref_transaction_update_reflog` function

From: Patrick Steinhardt <hidden>
Date: 2024-12-13 12:24:44

On Fri, Dec 13, 2024 at 11:36:51AM +0100, Karthik Nayak wrote:
quoted hunk ↗ jump to hunk
diff --git a/refs.h b/refs.h
index a5bedf48cf6de91005a7e8d0bf58ca98350397a6..67f8b3eef3f2101409e5cc6eb2241d99e9f7d95c 100644
--- a/refs.h
+++ b/refs.h
@@ -727,6 +727,18 @@ int ref_transaction_update(struct ref_transaction *transaction,
 			   unsigned int flags, const char *msg,
 			   struct strbuf *err);
 
+/*
+ * Similar to`ref_transaction_update`, but this function is only for adding
+ * a reflog update. Supports providing custom committer information.
+ */
+int ref_transaction_update_reflog(struct ref_transaction *transaction,
+				  const char *refname,
+				  const struct object_id *new_oid,
+				  const struct object_id *old_oid,
+				  const char *committer_info, unsigned int flags,
+				  const char *msg, unsigned int index,
+				  struct strbuf *err);
+
Nit: it would be great to explain what the index does in the doc, as it
is completely non-obvious.

Patrick
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help