On Wed, Nov 01, 2017 at 10:46:14PM +0100, Johannes Schindelin wrote: > > - it calls die() rather than returning an error. Looking at the > > callsites, I'm inclined to say that would be fine. Failing to write > > to the todo file is essentially a fatal error for sequencer code. > > I spent substantial time on making the sequencer code libified (it was far > from it). That die() call may look okay now, but it is not at all okay if > we want to make Git's source code cleaner and more reusable. And I want > to. > > So my suggestion is to clean up write_file_buf() first, to stop behaving > like a drunk lemming, and to return an error value already, and only then > use it in sequencer.c. That would be fine with me, too. -Peff