Re: [PATCH 02/11] repository: introduce repo_read_index_or_die
- From
Stefan Beller <sbeller@google.com>
- Date
- May 21, 2018, 19:27 UTC
- Message-ID
- <CAGZ79kZ0TBzDMqpim1Wtr9QtF2OtskE=nRPx2Nj+rwyT8HMqTw@mail.gmail.com>
- In-Reply-To
- <20180521185040.GA125693@google.com>
Hi Brandon,
Show 9 quoted lines
>> One of the reviewers of the series questioned the overall goal of the >> series as we want to move away from _die() in top level code but this >> series moves more towards it. > > I've heard every once in a while that we want to move toward this but I > don't believe there is an actual effort along those lines just yet. For > that to be the case we would need a clearly defined error handling > methodology (aside from the existing "die"ing behavior), which we don't > currently have.
We have the example in the refs code, which I would want to imitate. :)
/* * Return 0 if a reference named refname could be created without * conflicting with the name of an existing reference. Otherwise, * return a negative value and write an explanation to err. [...] */
int refs_verify_refname_available(struct ref_store *refs, ...
struct strbuf *err);extern int refs_init_db(struct strbuf *err);
But it is true that there is no active effort currently being pushed.
Thanks, Stefan