Re: [PATCH 17/18] Place the open() call inside the do{} struct and prevent failing close

2013-06-06 Thread Junio C Hamano
Célestin Matte celestin.ma...@ensimag.fr writes: Placing the open() call inside the do{} struct will automatically close the filehandle if possible. Placing the close() call outside the do{} struct is useless and will make it fail systematically Change the error message to state that what

Re: [PATCH 17/18] Place the open() call inside the do{} struct and prevent failing close

2013-06-06 Thread Célestin Matte
Le 06/06/2013 23:13, Junio C Hamano a écrit : Confused. Which part of this patch moves open inside a do{} block? This was last touched by [9/18] but it doesn't do any such thing, either. I must have failed the rebase, as the first part of the commit moved to [14/18] because it modifies a part

Re: [PATCH 17/18] Place the open() call inside the do{} struct and prevent failing close

2013-06-06 Thread Junio C Hamano
Célestin Matte celestin.ma...@ensimag.fr writes: So using autodie may not be a good idea. But the problem is that in the current state, open() return values are checked, but print ones are not, although it should be. I tried man autodie and tried to spot 'print' in the categories list that

Re: [PATCH 17/18] Place the open() call inside the do{} struct and prevent failing close

2013-06-06 Thread Célestin Matte
Le 06/06/2013 23:58, Junio C Hamano a écrit : Célestin Matte celestin.ma...@ensimag.fr writes: So using autodie may not be a good idea. But the problem is that in the current state, open() return values are checked, but print ones are not, although it should be. I tried man autodie and