Re: [PATCH 5/6] refs.c: write to a lock file only once

2015-01-21 Thread Jeff King
On Wed, Jan 21, 2015 at 03:23:44PM -0800, Stefan Beller wrote: > + const char *sha1_lf; > > if (!lock) { > errno = EINVAL; > @@ -3104,8 +3104,9 @@ static int write_ref_sha1(struct ref_lock *lock, > errno = EINVAL; > return -1; > } > -

[PATCH 5/6] refs.c: write to a lock file only once

2015-01-21 Thread Stefan Beller
Instead of having to call write_in_full_to_lock_file twice get a formatted string such that we only need to invoke writing to the lock file once. This is helpful for the next patch when we only open the file descriptors as needed. The lock file API has a reopen_lock_file which currently doesn't op