Re: [PATCH] grep: handle corrupt index files early

2018-05-17 Thread Junio C Hamano
Stefan Beller writes: > On Wed, May 16, 2018 at 6:36 PM, Junio C Hamano wrote: >> Duy Nguyen writes: >> >>> With a majority of call sites dying like this though, I wonder if we >>> should just add repo_read_index_or_die() with die()

Re: [PATCH] grep: handle corrupt index files early

2018-05-17 Thread Stefan Beller
On Wed, May 16, 2018 at 6:36 PM, Junio C Hamano wrote: > Duy Nguyen writes: > >> With a majority of call sites dying like this though, I wonder if we >> should just add repo_read_index_or_die() with die() inside. Then the >> next person won't likely

Re: [PATCH] grep: handle corrupt index files early

2018-05-16 Thread Junio C Hamano
Duy Nguyen writes: > With a majority of call sites dying like this though, I wonder if we > should just add repo_read_index_or_die() with die() inside. Then the > next person won't likely accidentally forget _() Yuck. That sounds like inviting a major code churn. I tend to

Re: [PATCH] grep: handle corrupt index files early

2018-05-16 Thread Duy Nguyen
On Tue, May 15, 2018 at 6:44 PM, Stefan Beller wrote: > On Tue, May 15, 2018 at 6:13 AM, Duy Nguyen wrote: >> On Tue, May 15, 2018 at 3:04 AM, Stefan Beller wrote: >>> Any other caller of 'repo_read_index' dies upon a negative return of

Re: [PATCH] grep: handle corrupt index files early

2018-05-15 Thread Junio C Hamano
Stefan Beller writes: > Any other caller of 'repo_read_index' dies upon a negative return of > it, so grep should, too. Makes sense. When the function returns a failure, there is no sensible fallback action anyway, so dying here is alright. Will queue; thanks. > >

[PATCH] grep: handle corrupt index files early

2018-05-15 Thread Stefan Beller
Any other caller of 'repo_read_index' dies upon a negative return of it, so grep should, too. Signed-off-by: Stefan Beller --- Found while reviewing the series https://public-inbox.org/git/20180514105823.8378-1-...@ao2.it/ builtin/grep.c | 3 ++- 1 file changed, 2

Re: [PATCH] grep: handle corrupt index files early

2018-05-15 Thread Brandon Williams
On 05/14, Stefan Beller wrote: > Any other caller of 'repo_read_index' dies upon a negative return of > it, so grep should, too. > > Signed-off-by: Stefan Beller > --- > > Found while reviewing the series > https://public-inbox.org/git/20180514105823.8378-1-...@ao2.it/ > >

Re: [PATCH] grep: handle corrupt index files early

2018-05-15 Thread Stefan Beller
On Tue, May 15, 2018 at 6:13 AM, Duy Nguyen wrote: > On Tue, May 15, 2018 at 3:04 AM, Stefan Beller wrote: >> Any other caller of 'repo_read_index' dies upon a negative return of >> it, so grep should, too. >> >> Signed-off-by: Stefan Beller

Re: [PATCH] grep: handle corrupt index files early

2018-05-15 Thread Duy Nguyen
On Tue, May 15, 2018 at 3:04 AM, Stefan Beller wrote: > Any other caller of 'repo_read_index' dies upon a negative return of > it, so grep should, too. > > Signed-off-by: Stefan Beller > --- > > Found while reviewing the series >

Re: [PATCH] grep: handle corrupt index files early

2018-05-15 Thread Johannes Schindelin
Hi Stefan, On Mon, 14 May 2018, Stefan Beller wrote: > Any other caller of 'repo_read_index' dies upon a negative return of > it, so grep should, too. > > Signed-off-by: Stefan Beller > --- > > Found while reviewing the series >

[PATCH] grep: handle corrupt index files early

2018-05-14 Thread Stefan Beller
Any other caller of 'repo_read_index' dies upon a negative return of it, so grep should, too. Signed-off-by: Stefan Beller --- Found while reviewing the series https://public-inbox.org/git/20180514105823.8378-1-...@ao2.it/ builtin/grep.c | 3 ++- 1 file changed, 2