git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Michael Haggerty
Message 10 of 10 in “Improve test coverage of update-ref error messages”
  1. 0/6 Improve test coverage of update-ref error messagesMichael Haggerty, Jun 10, 2016
  2. 1/6 t1404: rename file to t1404-update-ref-errors.shMichael Haggerty, Jun 10, 2016
  3. 4/6 t1404: add more tests of update-ref error handlingMichael Haggerty, Jun 10, 2016
  4. 2/6 t1404: remove "prefix" argument to test_update_rejectedMichael Haggerty, Jun 10, 2016
  5. 3/6 t1404: document function test_update_rejectedMichael Haggerty, Jun 10, 2016
  6. 6/6 lock_ref_for_update(): avoid a symref resolutionMichael Haggerty, Jun 10, 2016
  7. 5/6 lock_ref_for_update(): make error handling more uniformMichael Haggerty, Jun 10, 2016
  8. David TurnerJun 10, 2016
  9. Michael HaggertyJun 13, 2016
  10. Michael HaggertyJun 13, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.