All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Michael Haggerty <mhagger@alum.mit.edu>
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 12:48:45 -0700	[thread overview]
Message-ID: <xmqqk2vtls2q.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1432337697-29161-4-git-send-email-mhagger@alum.mit.edu> (Michael Haggerty's message of "Sat, 23 May 2015 01:34:55 +0200")

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?

  reply	other threads:[~2015-05-27 19:48 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 [this message]
2015-05-27 21:18     ` Michael Haggerty
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=xmqqk2vtls2q.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mhagger@alum.mit.edu \
    --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.