Skip to content

Commit

Permalink
refs.c: make lock_ref_sha1 static
Browse files Browse the repository at this point in the history
No external callers reference lock_ref_sha1 any more so let's declare it
static.

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
Reviewed-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Ronnie Sahlberg authored and Junio C Hamano committed Sep 3, 2014
1 parent b6b10bb commit 88b680a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
7 changes: 5 additions & 2 deletions refs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2069,7 +2069,10 @@ int dwim_log(const char *str, int len, unsigned char *sha1, char **log)
return logs_found;
}

/* This function should make sure errno is meaningful on error */
/*
* Locks a "refs/" ref returning the lock on success and NULL on failure.
* On failure errno is set to something meaningful.
*/
static struct ref_lock *lock_ref_sha1_basic(const char *refname,
const unsigned char *old_sha1,
int flags, int *type_p)
Expand Down Expand Up @@ -2170,7 +2173,7 @@ static struct ref_lock *lock_ref_sha1_basic(const char *refname,
return NULL;
}

struct ref_lock *lock_ref_sha1(const char *refname, const unsigned char *old_sha1)
static struct ref_lock *lock_ref_sha1(const char *refname, const unsigned char *old_sha1)
{
char refpath[PATH_MAX];
if (check_refname_format(refname, 0))
Expand Down
6 changes: 0 additions & 6 deletions refs.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,6 @@ extern int ref_exists(const char *);
*/
extern int peel_ref(const char *refname, unsigned char *sha1);

/*
* Locks a "refs/" ref returning the lock on success and NULL on failure.
* On failure errno is set to something meaningful.
*/
extern struct ref_lock *lock_ref_sha1(const char *refname, const unsigned char *old_sha1);

/** Locks any ref (for 'HEAD' type refs). */
#define REF_NODEREF 0x01
/* errno is set to something meaningful on failure */
Expand Down

0 comments on commit 88b680a

Please sign in to comment.