Skip to content

Commit f8daf7c

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 <[email protected]> Signed-off-by: Karthik Nayak <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5e1c7b1 commit f8daf7c

File tree

2 files changed

+15
-21
lines changed

2 files changed

+15
-21
lines changed

refs.c

+15-7
Original file line numberDiff line numberDiff line change
@@ -1318,13 +1318,21 @@ int ref_transaction_update(struct ref_transaction *transaction,
13181318
return 0;
13191319
}
13201320

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)
13281336
{
13291337
struct ref_update *update;
13301338

refs.h

-14
Original file line numberDiff line numberDiff line change
@@ -771,20 +771,6 @@ int ref_transaction_update(struct ref_transaction *transaction,
771771
unsigned int flags, const char *msg,
772772
struct strbuf *err);
773773

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-
788774
/*
789775
* Add a reference creation to transaction. new_oid is the value that
790776
* the reference should have after the update; it must not be

0 commit comments

Comments
 (0)