From: Paul-Sebastian Ungureanu <ungureanupaulsebastian@gmail.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [RFC PATCH 0/6] Add gentle alternative for `get_oid()`
Date: Thu, 19 Jul 2018 02:03:29 +0300 [thread overview]
Message-ID: <8ebfad3c-7009-d0cc-2ef8-54ebac6783f9@gmail.com> (raw)
In-Reply-To: <CACsJy8AEDmyg1XpgXc5KgKdG33t2SeOHw56tEgL_VVXh1Bcprg@mail.gmail.com>
Hello,
On 17.07.2018 20:45, Duy Nguyen wrote:
> Since get_oid() callers must handle failure when it returns non-zero,
> I would say "gently" is already implied by get_oid() and we could just
> convert those die() to error() or warning(). Unless some of those
> die() are very special that we need to choose which call sites should
> go "even gentler" where some sites should still die()?
Of course, "gently" is already implied by `get_oid()` to some extent.
From the beginning I tried to follow the safer method to do that.
Changing `die()` into `error()` or `warning()` and handling the
error in the caller function not only would mean a harder patch
to read, but could also introduce some regressions since some of
the functions in the call graph of `get_oid()` are used by other
functions as well.
I think that it might be a good idea, but I am not entirely sure.
The codebase is pretty complex and this might make it harder to
follow. I am not able to give a clear answer, but thank you for
taking time to look over these patches!
Best,
Paul
prev parent reply other threads:[~2018-07-18 23:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-17 12:06 [RFC PATCH 0/6] Add gentle alternative for `get_oid()` Paul-Sebastian Ungureanu
2018-07-17 12:06 ` [RFC PATCH 1/6] sha1-name: Add `GET_OID_GENTLY` flag Paul-Sebastian Ungureanu
2018-07-17 12:06 ` [RFC PATCH 2/6] tree-walk: Add three new gentle helpers Paul-Sebastian Ungureanu
2018-07-17 18:55 ` Junio C Hamano
2018-07-18 23:11 ` Paul-Sebastian Ungureanu
2018-07-17 12:06 ` [RFC PATCH 3/6] refs.c: Teach `read_ref_at()` to accept `GET_OID_GENTLY` flag Paul-Sebastian Ungureanu
2018-07-17 12:06 ` [RFC PATCH 4/6] sha1-name: Teach `get_oid_basic()` to be gentle Paul-Sebastian Ungureanu
2018-07-17 12:06 ` [RFC PATCH 5/6] sha1-name: Teach `get_oid_with_context[_1]()` " Paul-Sebastian Ungureanu
2018-07-17 19:13 ` Junio C Hamano
2018-07-18 23:14 ` Paul-Sebastian Ungureanu
2018-07-17 12:06 ` [RFC PATCH 6/6] sha1-name: Add gentle alternative for `get_oid()` Paul-Sebastian Ungureanu
2018-07-17 17:45 ` [RFC PATCH 0/6] " Duy Nguyen
2018-07-18 23:03 ` Paul-Sebastian Ungureanu [this message]
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=8ebfad3c-7009-d0cc-2ef8-54ebac6783f9@gmail.com \
--to=ungureanupaulsebastian@gmail.com \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).