Skip to content

Commit fc31955

Browse files
mhaggergitster
authored andcommitted
log_ref_write_1(): inline function
Now files_log_ref_write() doesn't do anything beyond call log_ref_write_1(), so inline the latter into the former. Signed-off-by: Michael Haggerty <[email protected]> Reviewed-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4533e53 commit fc31955

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

refs/files-backend.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2821,9 +2821,9 @@ static int log_ref_write_fd(int fd, const unsigned char *old_sha1,
28212821
return 0;
28222822
}
28232823

2824-
static int log_ref_write_1(const char *refname, const unsigned char *old_sha1,
2825-
const unsigned char *new_sha1, const char *msg,
2826-
int flags, struct strbuf *err)
2824+
int files_log_ref_write(const char *refname, const unsigned char *old_sha1,
2825+
const unsigned char *new_sha1, const char *msg,
2826+
int flags, struct strbuf *err)
28272827
{
28282828
int logfd, result;
28292829

@@ -2858,13 +2858,6 @@ static int log_ref_write_1(const char *refname, const unsigned char *old_sha1,
28582858
return 0;
28592859
}
28602860

2861-
int files_log_ref_write(const char *refname, const unsigned char *old_sha1,
2862-
const unsigned char *new_sha1, const char *msg,
2863-
int flags, struct strbuf *err)
2864-
{
2865-
return log_ref_write_1(refname, old_sha1, new_sha1, msg, flags, err);
2866-
}
2867-
28682861
/*
28692862
* Write sha1 into the open lockfile, then close the lockfile. On
28702863
* errors, rollback the lockfile, fill in *err and

0 commit comments

Comments
 (0)