Re: [PATCH v2 5/6] lock_ref_for_update(): make error handling more uniform
- From
Michael Haggerty <mhagger@alum.mit.edu>
- Date
- Jun 13, 2016, 10:10 UTC
- Message-ID
- <575E868B.70402@alum.mit.edu>
- In-Reply-To
- <575E5DB5.8040109@alum.mit.edu>
On 06/13/2016 09:16 AM, Michael Haggerty wrote:
Show 12 quoted lines
> On 06/10/2016 09:01 PM, David Turner wrote: >> On Fri, 2016-06-10 at 10:14 +0200, Michael Haggerty wrote: >> >>> /* >>> + * Check whether the REF_HAVE_OLD and old_oid values stored in update >>> + * are consistent with the result read for the reference. error is >>> + * true iff there was an error reading the reference; otherwise, oid >> >> "error" is not a thing here? > > You're right; thanks for the feedback. I'll include it in the reroll > that I'm about to do.
I have changed the docstring as follows:
Show 12 quoted lines
> /* > * Check whether the REF_HAVE_OLD and old_oid values stored in update > - * are consistent with the result read for the reference. error is > - * true iff there was an error reading the reference; otherwise, oid > - * is the value read for the reference. > - * > - * If there was a problem, write an error message to err and return > - * -1. > + * are consistent with oid, which is the reference's current value. If > + * everything is OK, return 0; otherwise, write an error message to > + * err and return -1. > */
I've folded that change into the patch series on branch update-ref-errors on my GitHub fork [1]. I won't sent a re-roll to the mailing list unless other changes are necessary (or unless somebody requests it).
Michael
[1] https://github.com/mhagger/git