files-backend: make files_log_ref_write() static

Created in 5f3c3a4e6f (files_log_ref_write: new function - 2015-11-10) but probably never used outside refs-internal.c Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed Mar 26, 2017 at 09:42 UTC 11f8457fb9b787f350e176fd28ee8c01fd2b82d5
2 files changed +6 -7
refs/files-backend.c
+6 -3
@@ -165,6 +165,9 @@ static struct ref_entry *create_dir_entry(struct files_ref_store *ref_store,
165 const char *dirname, size_t len,
166 int incomplete);
167 static void add_entry_to_dir(struct ref_dir *dir, struct ref_entry *entry);
168 +static int files_log_ref_write(const char *refname, const unsigned char *old_sha1,
169 + const unsigned char *new_sha1, const char *msg,
170 + int flags, struct strbuf *err);
171
172 static struct ref_dir *get_ref_dir(struct ref_entry *entry)
173 {
@@ -2831,9 +2834,9 @@ static int log_ref_write_fd(int fd, const unsigned char *old_sha1,
2834 return 0;
2835 }
2836
2834 -int files_log_ref_write(const char *refname, const unsigned char *old_sha1,
2835 - const unsigned char *new_sha1, const char *msg,
2836 - int flags, struct strbuf *err)
2837 +static int files_log_ref_write(const char *refname, const unsigned char *old_sha1,
2838 + const unsigned char *new_sha1, const char *msg,
2839 + int flags, struct strbuf *err)
2840 {
2841 int logfd, result;
2842
refs/refs-internal.h
-4
@@ -228,10 +228,6 @@ struct ref_transaction {
228 enum ref_transaction_state state;
229 };
230
231 -int files_log_ref_write(const char *refname, const unsigned char *old_sha1,
232 - const unsigned char *new_sha1, const char *msg,
233 - int flags, struct strbuf *err);
234 -
231 /*
232 * Check for entries in extras that are within the specified
233 * directory, where dirname is a reference directory name including