aboutsummaryrefslogtreecommitdiff
path: root/builtin/worktree.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2016-07-07 22:08:30 +0200
committerJunio C Hamano <gitster@pobox.com>2016-07-07 14:16:26 -0700
commitdeb9c1575c456b9d12ff05fdd2bec516dfb34ae4 (patch)
tree5e4176e8274882e8867a465b6c822f214d15f2fa /builtin/worktree.c
parent0b65a8dbdb38962e700ee16776a3042beb489060 (diff)
downloadgit-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/worktree.c')
0 files changed, 0 insertions, 0 deletions