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

Re: [RFC PATCH 0/6] Add gentle alternative for `get_oid()`

From
Paul-Sebastian Ungureanu <ungureanupaulsebastian@gmail.com>
Date
Jul 18, 2018, 23:03 UTC
Message-ID
<8ebfad3c-7009-d0cc-2ef8-54ebac6783f9@gmail.com>
In-Reply-To
<CACsJy8AEDmyg1XpgXc5KgKdG33t2SeOHw56tEgL_VVXh1Bcprg@mail.gmail.com>
Hello,
On 17.07.2018 20:45, Duy Nguyen wrote:
Show 5 quoted lines
> 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

Previous: Duy Nguyen
Message 13 of 13 in “Add gentle alternative for `get_oid()`”
  1. 0/6 Add gentle alternative for `get_oid()`Paul-Sebastian Ungureanu, Jul 17, 2018
  2. 5/6 sha1-name: Teach `get_oid_with_context[_1]()` to be gentlePaul-Sebastian Ungureanu, Jul 17, 2018
  3. Junio C HamanoJul 17, 2018
  4. Paul-Sebastian UngureanuJul 18, 2018
  5. 6/6 sha1-name: Add gentle alternative for `get_oid()`Paul-Sebastian Ungureanu, Jul 17, 2018
  6. 4/6 sha1-name: Teach `get_oid_basic()` to be gentlePaul-Sebastian Ungureanu, Jul 17, 2018
  7. 3/6 refs.c: Teach `read_ref_at()` to accept `GET_OID_GENTLY` flagPaul-Sebastian Ungureanu, Jul 17, 2018
  8. 2/6 tree-walk: Add three new gentle helpersPaul-Sebastian Ungureanu, Jul 17, 2018
  9. Junio C HamanoJul 17, 2018
  10. Paul-Sebastian UngureanuJul 18, 2018
  11. 1/6 sha1-name: Add `GET_OID_GENTLY` flagPaul-Sebastian Ungureanu, Jul 17, 2018
  12. Duy NguyenJul 17, 2018
  13. Paul-Sebastian UngureanuJul 18, 2018

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.