refs: mark `ref_transaction_update_reflog()` as static

The `ref_transaction_update_reflog()` function is only used within 'refs.c', so mark it as static. Reported-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Karthik Nayak committed Jan 22, 2025 at 06:35 UTC af47976cc044ecfd52105bb45f6a9085b3c8a772
2 files changed +15 -21
refs.c
+15 -7
@@ -1318,13 +1318,21 @@ int ref_transaction_update(struct ref_transaction *transaction,
1318 return 0;
1319 }
1320
1321 -int ref_transaction_update_reflog(struct ref_transaction *transaction,
1322 - const char *refname,
1323 - const struct object_id *new_oid,
1324 - const struct object_id *old_oid,
1325 - const char *committer_info, unsigned int flags,
1326 - const char *msg, unsigned int index,
1327 - struct strbuf *err)
1321 +/*
1322 + * Similar to`ref_transaction_update`, but this function is only for adding
1323 + * a reflog update. Supports providing custom committer information. The index
1324 + * field can be utiltized to order updates as desired. When not used, the
1325 + * updates default to being ordered by refname.
1326 + */
1327 +static int ref_transaction_update_reflog(struct ref_transaction *transaction,
1328 + const char *refname,
1329 + const struct object_id *new_oid,
1330 + const struct object_id *old_oid,
1331 + const char *committer_info,
1332 + unsigned int flags,
1333 + const char *msg,
1334 + unsigned int index,
1335 + struct strbuf *err)
1336 {
1337 struct ref_update *update;
1338
refs.h
-14
@@ -771,20 +771,6 @@ int ref_transaction_update(struct ref_transaction *transaction,
771 unsigned int flags, const char *msg,
772 struct strbuf *err);
773
774 -/*
775 - * Similar to`ref_transaction_update`, but this function is only for adding
776 - * a reflog update. Supports providing custom committer information. The index
777 - * field can be utiltized to order updates as desired. When not used, the
778 - * updates default to being ordered by refname.
779 - */
780 -int ref_transaction_update_reflog(struct ref_transaction *transaction,
781 - const char *refname,
782 - const struct object_id *new_oid,
783 - const struct object_id *old_oid,
784 - const char *committer_info, unsigned int flags,
785 - const char *msg, unsigned int index,
786 - struct strbuf *err);
787 -
774 /*
775 * Add a reference creation to transaction. new_oid is the value that
776 * the reference should have after the update; it must not be