diff options
author | René Scharfe <l.s.r@web.de> | 2017-10-31 10:58:16 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-11-01 10:53:19 +0900 |
commit | c8cee96e8a8de2e9c6f12bfac8295f1b9ee29112 (patch) | |
tree | 89cdb08974add4b354fe975d2bfe571ca010a846 /t | |
parent | sequencer: factor out rewrite_file() (diff) | |
download | tgif-c8cee96e8a8de2e9c6f12bfac8295f1b9ee29112.tar.xz |
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>
Diffstat (limited to 't')
0 files changed, 0 insertions, 0 deletions