Skip to content

Commit 6638779

Browse files
KarthikNayakdscho
authored andcommitted
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>
1 parent bc67b4a commit 6638779

File tree

2 files changed

+15
-21
lines changed

2 files changed

+15
-21
lines changed

refs.c

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,13 +1270,21 @@ int ref_transaction_update(struct ref_transaction *transaction,
12701270
return 0;
12711271
}
12721272

1273-
int ref_transaction_update_reflog(struct ref_transaction *transaction,
1274-
const char *refname,
1275-
const struct object_id *new_oid,
1276-
const struct object_id *old_oid,
1277-
const char *committer_info, unsigned int flags,
1278-
const char *msg, unsigned int index,
1279-
struct strbuf *err)
1273+
/*
1274+
* Similar to`ref_transaction_update`, but this function is only for adding
1275+
* a reflog update. Supports providing custom committer information. The index
1276+
* field can be utiltized to order updates as desired. When not used, the
1277+
* updates default to being ordered by refname.
1278+
*/
1279+
static int ref_transaction_update_reflog(struct ref_transaction *transaction,
1280+
const char *refname,
1281+
const struct object_id *new_oid,
1282+
const struct object_id *old_oid,
1283+
const char *committer_info,
1284+
unsigned int flags,
1285+
const char *msg,
1286+
unsigned int index,
1287+
struct strbuf *err)
12801288
{
12811289
struct ref_update *update;
12821290

refs.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -727,20 +727,6 @@ int ref_transaction_update(struct ref_transaction *transaction,
727727
unsigned int flags, const char *msg,
728728
struct strbuf *err);
729729

730-
/*
731-
* Similar to`ref_transaction_update`, but this function is only for adding
732-
* a reflog update. Supports providing custom committer information. The index
733-
* field can be utiltized to order updates as desired. When not used, the
734-
* updates default to being ordered by refname.
735-
*/
736-
int ref_transaction_update_reflog(struct ref_transaction *transaction,
737-
const char *refname,
738-
const struct object_id *new_oid,
739-
const struct object_id *old_oid,
740-
const char *committer_info, unsigned int flags,
741-
const char *msg, unsigned int index,
742-
struct strbuf *err);
743-
744730
/*
745731
* Add a reference creation to transaction. new_oid is the value that
746732
* the reference should have after the update; it must not be

0 commit comments

Comments
 (0)