Re: [PATCH v4 1/3] refs.c: split writing and commiting a ref into two separate functions

2014-04-15 Thread Michael Haggerty
See my comment to your cover letter where I suggest using ref transactions instead of making callers deal with even more of the details of updating references. But I will comment on these patches anyway, in case you'd rather leave them closer to the current form. On 04/14/2014 08:29 PM, Ronnie

[PATCH v4 1/3] refs.c: split writing and commiting a ref into two separate functions

2014-04-14 Thread Ronnie Sahlberg
Change the function write_ref_sha1() to just write the ref but not commit the ref or the lockfile. Add a new function commit_ref_lock() that will commit the change done by a previous write_ref_sha1(). Update all callers of write_ref_sha1() to call commit_ref_lock(). The new pattern for updating a