Commit c8cee96
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>1 parent 73646bf commit c8cee96
1 file changed
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2668 | 2668 | | |
2669 | 2669 | | |
2670 | 2670 | | |
2671 | | - | |
| 2671 | + | |
2672 | 2672 | | |
2673 | 2673 | | |
2674 | 2674 | | |
2675 | 2675 | | |
2676 | | - | |
2677 | | - | |
2678 | 2676 | | |
2679 | 2677 | | |
2680 | 2678 | | |
| |||
0 commit comments