Re: Why do we have both x*() and *_or_die() for "do or die"?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 23, 2018, 03:19 UTC
- Message-ID
- <xmqq4lizvz2v.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <874liz8tsi.fsf@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> Just a side-question unrelated to this patch per-se, why do we have both > x*() and *_or_die() functions in the codebase? I can't find any pattern > for one or the other.
My understanding is that x*() were meant for system library functions. read-index-or-die should never be x-read-index.
Quite honestly, read-index should probably have designed to die from the beginning, with read-index-gently as a variant to report an error instead of dying.