Re: Why do we have both x*() and *_or_die() for "do or die"?

2018-05-22 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason 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.

Re: Why do we have both x*() and *_or_die() for "do or die"?

2018-05-22 Thread Jonathan Nieder
Duy Nguyen wrote: > On Tue, May 22, 2018 at 7:49 PM, Ævar Arnfjörð Bjarmason > wrote: >> Just a side-question unrelated to this patch per-se, why do we have both >> x*() and *_or_die() functions in the codebase? > > I wondered about that myself shortly after suggesting >

Re: Why do we have both x*() and *_or_die() for "do or die"?

2018-05-22 Thread Stefan Beller
On Tue, May 22, 2018 at 10:49 AM, Ævar Arnfjörð Bjarmason wrote: > > On Wed, May 16 2018, Stefan Beller wrote: > >> A common pattern with the repo_read_index function is to die if the return >> of repo_read_index is negative. Move this pattern into a function. This was done

Re: Why do we have both x*() and *_or_die() for "do or die"?

2018-05-22 Thread Duy Nguyen
On Tue, May 22, 2018 at 7:49 PM, Ævar Arnfjörð Bjarmason wrote: > > On Wed, May 16 2018, Stefan Beller wrote: > >> A common pattern with the repo_read_index function is to die if the return >> of repo_read_index is negative. Move this pattern into a function. > > Just a

Why do we have both x*() and *_or_die() for "do or die"?

2018-05-22 Thread Ævar Arnfjörð Bjarmason
On Wed, May 16 2018, Stefan Beller wrote: > A common pattern with the repo_read_index function is to die if the return > of repo_read_index is negative. Move this pattern into a function. Just a side-question unrelated to this patch per-se, why do we have both x*() and *_or_die() functions in