Re: [PATCH] am: ignore return value of write_file()

2016-07-10 Thread Johannes Schindelin
Hi Peff, On Sat, 9 Jul 2016, Johannes Schindelin wrote: > On Fri, 8 Jul 2016, Jeff King wrote: > > > I think we can clean that up, though. I'll hopefully have a series in a > > few minutes. > > You caught me at busy times... I'll review it tomorrow, promise! And so I did. Looks good to me, I w

Re: [PATCH] am: ignore return value of write_file()

2016-07-09 Thread Johannes Schindelin
Hi Peff, On Fri, 8 Jul 2016, Jeff King wrote: > I think we can clean that up, though. I'll hopefully have a series in a > few minutes. You caught me at busy times... I'll review it tomorrow, promise! Ciao, Dscho -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a

Re: [PATCH] am: ignore return value of write_file()

2016-07-08 Thread Jeff King
On Fri, Jul 08, 2016 at 08:44:28PM +0200, René Scharfe wrote: > > The question is whether it makes sense for write_file() to die(). It is a > > library function and not every caller can be happy with that function to > > exit the program when some file could not be written, without a chance to > >

Re: [PATCH] am: ignore return value of write_file()

2016-07-08 Thread René Scharfe
Hi Dscho, Am 08.07.2016 um 08:33 schrieb Johannes Schindelin: On Thu, 7 Jul 2016, René Scharfe wrote: write_file() either returns 0 or dies, so there is no point in checking its return value. The question is whether it makes sense for write_file() to die(). It is a library function and not ev

Re: [PATCH] am: ignore return value of write_file()

2016-07-07 Thread Jeff King
On Fri, Jul 08, 2016 at 08:37:35AM +0200, Johannes Schindelin wrote: > > We have two forms of write_file(): one that dies, and one > > that returns an error. However, the latter has only a single > > caller, which immediately dies anyway (after producing a > > message that is not really any more i

Re: [PATCH] am: ignore return value of write_file()

2016-07-07 Thread Johannes Schindelin
Hi Peff, On Thu, 7 Jul 2016, Jeff King wrote: > We have two forms of write_file(): one that dies, and one > that returns an error. However, the latter has only a single > caller, which immediately dies anyway (after producing a > message that is not really any more informative than > write_file's

Re: [PATCH] am: ignore return value of write_file()

2016-07-07 Thread Johannes Schindelin
Hi René, On Thu, 7 Jul 2016, René Scharfe wrote: > write_file() either returns 0 or dies, so there is no point in checking > its return value. The question is whether it makes sense for write_file() to die(). It is a library function and not every caller can be happy with that function to exit t

Re: [PATCH] am: ignore return value of write_file()

2016-07-07 Thread Jeff King
On Thu, Jul 07, 2016 at 10:02:14PM +0200, René Scharfe wrote: > write_file() either returns 0 or dies, so there is no point in checking > its return value. The callers of the wrappers write_state_text(), > write_state_count() and write_state_bool() consequently already ignore > their return value

[PATCH] am: ignore return value of write_file()

2016-07-07 Thread René Scharfe
write_file() either returns 0 or dies, so there is no point in checking its return value. The callers of the wrappers write_state_text(), write_state_count() and write_state_bool() consequently already ignore their return values. Stop pretenting we care and make them void. Signed-off-by: Rene Sc