Re: [PATCH v8 28/44] refs.c: make write_ref_sha1 static
- From
Ronnie Sahlberg <sahlberg@google.com>
- Date
- May 21, 2014, 14:46 UTC
- Message-ID
- <CAL=YDWnyrL7L6gQKg87tj25Gh6NDp867HfJX_4j85f5wDRGh6w@mail.gmail.com>
- In-Reply-To
- <20140521005134.GY12314@google.com>
Thanks!
On Tue, May 20, 2014 at 5:51 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 16 quoted lines
> Ronnie Sahlberg wrote:
>
>> No external users call write_ref_sha1 any more so lets declare it static.
>
> Yay!
>
> [...]
>> +++ b/refs.c
>> @@ -251,6 +251,8 @@ struct ref_entry {
> [...]
>> static void read_loose_refs(const char *dirname, struct ref_dir *dir);
>> +static int write_ref_sha1(struct ref_lock *lock,
>> + const unsigned char *sha1, const char *logmsg);
>
> Is this forward declaration needed?
>No. Removed. (I could have sworn I had a patch to remove this forward declaration.)
Show 11 quoted lines
> [...] >> --- a/refs.h >> +++ b/refs.h >> @@ -150,9 +150,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); > > (nit) Would be nice to keep the documentation comment.
Moved this comment to refs.c
Please see ref-transactions branch Thanks!
> > Thanks, > Jonathan