Skip to content

Commit

Permalink
refs: mark ref_transaction_update_reflog() as static
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
KarthikNayak authored and dscho committed Jan 22, 2025
1 parent bc67b4a commit 6638779
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 21 deletions.
22 changes: 15 additions & 7 deletions refs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1270,13 +1270,21 @@ int ref_transaction_update(struct ref_transaction *transaction,
return 0;
}

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)
/*
* Similar to`ref_transaction_update`, but this function is only for adding
* a reflog update. Supports providing custom committer information. The index
* field can be utiltized to order updates as desired. When not used, the
* updates default to being ordered by refname.
*/
static 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)
{
struct ref_update *update;

Expand Down
14 changes: 0 additions & 14 deletions refs.h
Original file line number Diff line number Diff line change
Expand Up @@ -727,20 +727,6 @@ 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. The index
* field can be utiltized to order updates as desired. When not used, the
* updates default to being ordered by refname.
*/
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);

/*
* Add a reference creation to transaction. new_oid is the value that
* the reference should have after the update; it must not be
Expand Down

0 comments on commit 6638779

Please sign in to comment.