sequencer: use O_TRUNC to truncate files
authorRené Scharfe <l.s.r@web.de>
Tue, 31 Oct 2017 09:58:16 +0000 (10:58 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 Nov 2017 01:53:19 +0000 (10:53 +0900)
commitc8cee96e8a8de2e9c6f12bfac8295f1b9ee29112
tree89cdb08974add4b354fe975d2bfe571ca010a846
parent73646bfdcb38114a4d9242a02fc180a9877e01bf
sequencer: use O_TRUNC to truncate files

Cut off any previous content of the file to be rewritten by passing the
flag O_TRUNC to open(2) instead of calling ftruncate(2) at the end.
That's easier and shorter.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c