Re: [PATCH] am: ignore return value of write_file()
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jul 8, 2016, 06:37 UTC
- Message-ID
- <alpine.DEB.2.20.1607080834340.6426@virtualbox>
- In-Reply-To
- <20160707203157.GA11804@sigill.intra.peff.net>
Hi Peff,
On Thu, 7 Jul 2016, Jeff King wrote:
Show 6 quoted lines
> 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 generic die(), and arguably worse because it > does not give the actual filename).
This is more an illustration of unnecessarily duplicated code, isn't it? There are *tons* of instances in Git's code where writing to a file is implemented separately (and differently).
It would make tons of sense to consolidate all of these instances, methinks. The diffstat should look *very* pleasing.
Ciao, Dscho