From: Michael Haggerty <mhagger@alum.mit.edu>
To: Junio C Hamano <gitster@pobox.com>
Cc: Stefan Beller <sbeller@google.com>, git@vger.kernel.org
Subject: Re: [PATCH 3/5] verify_lock(): report errors via a strbuf
Date: Wed, 27 May 2015 23:18:05 +0200 [thread overview]
Message-ID: <5566348D.7040506@alum.mit.edu> (raw)
In-Reply-To: <xmqqk2vtls2q.fsf@gitster.dls.corp.google.com>
On 05/27/2015 09:48 PM, Junio C Hamano wrote:
> Michael Haggerty <mhagger@alum.mit.edu> writes:
>
>> Instead of writing error messages directly to stderr, write them to a
>> "strbuf *err". In lock_ref_sha1_basic(), arrange for these errors to
>> be returned to its caller.
>
> I had to scratch my head and view long outside the context before
> realizing that the caller lock_ref_sha1_basic() already arranges
> with its caller that errors from it are passed via the strbuf, and
> this change is just turning verify_lock(), a callee from it, follows
> that already established pattern.
>
> Looks sensible, but the last sentence was misleading at least to me.
>
> The caller, lock_ref_sha1_basic(), uses this error reporting
> convention with all the other callees, and reports its error
> this way to its callers.
>
> perhaps?
+1
Thanks for clarifying this sentence.
Michael
--
Michael Haggerty
mhagger@alum.mit.edu
next prev parent reply other threads:[~2015-05-27 21:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-22 23:34 [PATCH 0/5] Fix verify_lock() to report errors via strbuf Michael Haggerty
2015-05-22 23:34 ` [PATCH 1/5] verify_lock(): return 0/-1 rather than struct ref_lock * Michael Haggerty
2015-05-23 0:09 ` Stefan Beller
2015-05-22 23:34 ` [PATCH 2/5] verify_lock(): on errors, let the caller unlock the lock Michael Haggerty
2015-05-22 23:34 ` [PATCH 3/5] verify_lock(): report errors via a strbuf Michael Haggerty
2015-05-27 19:48 ` Junio C Hamano
2015-05-27 21:18 ` Michael Haggerty [this message]
2015-05-22 23:34 ` [PATCH 4/5] verify_lock(): do not capitalize error messages Michael Haggerty
2015-05-22 23:34 ` [PATCH 5/5] ref_transaction_commit(): " Michael Haggerty
2015-05-23 0:15 ` [PATCH 0/5] Fix verify_lock() to report errors via strbuf Stefan Beller
2015-05-27 11:59 ` Michael Haggerty
2015-05-27 19:55 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5566348D.7040506@alum.mit.edu \
--to=mhagger@alum.mit.edu \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sbeller@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.