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 <mhagger@alum.mit.edu> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Haggerty committed
Jan 6, 2017 at 17:22 UTC
fc31955294a1baf4845558451494ce42ee70444b
1 file changed
+3
-10
refs/files-backend.c
+3
-10
@@ -2821,9 +2821,9 @@ static int log_ref_write_fd(int fd, const unsigned char *old_sha1,
2821
return 0;
2822
}
2823
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)
2827
{
2828
int logfd, result;
2829
@@ -2858,13 +2858,6 @@ static int log_ref_write_1(const char *refname, const unsigned char *old_sha1,
2858
return 0;
2859
}
2860
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
-
2861
/*
2862
* Write sha1 into the open lockfile, then close the lockfile. On
2863
* errors, rollback the lockfile, fill in *err and