diff options
author | René Scharfe <l.s.r@web.de> | 2016-07-07 22:08:30 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-07-07 14:16:26 -0700 |
commit | deb9c1575c456b9d12ff05fdd2bec516dfb34ae4 (patch) | |
tree | 5e4176e8274882e8867a465b6c822f214d15f2fa /builtin | |
parent | 0b65a8dbdb38962e700ee16776a3042beb489060 (diff) | |
download | git-deb9c1575c456b9d12ff05fdd2bec516dfb34ae4.tar.gz git-deb9c1575c456b9d12ff05fdd2bec516dfb34ae4.tar.xz |
notes-merge: use O_EXCL to avoid overwriting existing files
Use the open(2) flag O_EXCL to ensure the file doesn't already exist
instead of (racily) calling stat(2) through file_exists(). While at it
switch to xopen() to reduce code duplication and get more consistent
error messages.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
0 files changed, 0 insertions, 0 deletions