From: Ronnie Sahlberg Date: Thu, 29 May 2014 16:07:56 GMT Subject: [PATCH v12 41/41] refs.c: make write_ref_sha1 static Message-ID: <1401379676-9307-15-git-send-email-sahlberg@google.com> In-Reply-To: <1401379676-9307-1-git-send-email-sahlberg@google.com> No external users call write_ref_sha1 any more so lets declare it static. Signed-off-by: Ronnie Sahlberg --- refs.c | 6 +++++- refs.h | 3 --- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/refs.c b/refs.c index 6414afc..aefa5bc 100644 --- a/refs.c +++ b/refs.c @@ -2618,6 +2618,9 @@ static int rename_tmp_log(const char *newrefname) return 0; } +static int write_ref_sha1(struct ref_lock *lock, const unsigned char *sha1, + const char *logmsg); + int rename_ref(const char *oldrefname, const char *newrefname, const char *logmsg) { unsigned char sha1[20], orig_sha1[20]; @@ -2848,7 +2851,8 @@ static int is_branch(const char *refname) return !strcmp(refname, "HEAD") || starts_with(refname, "refs/heads/"); } -int write_ref_sha1(struct ref_lock *lock, +/** Writes sha1 into the ref specified by the lock. **/ +static int write_ref_sha1(struct ref_lock *lock, const unsigned char *sha1, const char *logmsg) { static char term = '\n'; diff --git a/refs.h b/refs.h index 88732a1..88020c5 100644 --- a/refs.h +++ b/refs.h @@ -195,9 +195,6 @@ extern int commit_ref(struct ref_lock *lock); /** Release any lock taken but not written. **/ extern void unlock_ref(struct ref_lock *lock); -/** Writes sha1 into the ref specified by the lock. **/ -extern int write_ref_sha1(struct ref_lock *lock, const unsigned char *sha1, const char *msg); - /** Setup reflog before using. **/ int log_ref_setup(const char *refname, char *logfile, int bufsize); -- 2.0.0.rc3.474.g3833130