Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2006-01-05 11:58:06 +0300
committerJunio C Hamano <junkio@cox.net>2006-01-06 04:22:47 +0300
commit781411ed46400f95c45c5ca103769288025b39d6 (patch)
treeba6966a4f4e7a88b4001f4489a53fb460bbd56b3 /apply.c
parent7f272ca80c1dbb8157e204a821365448eaec52ea (diff)
trivial: O_EXCL makes O_TRUNC redundant
Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'apply.c')
-rw-r--r--apply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apply.c b/apply.c
index d5e7bfdb4d..9eba034e5d 100644
--- a/apply.c
+++ b/apply.c
@@ -1588,7 +1588,7 @@ static int try_create_file(const char *path, unsigned int mode, const char *buf,
if (S_ISLNK(mode))
return symlink(buf, path);
- fd = open(path, O_CREAT | O_EXCL | O_WRONLY | O_TRUNC, (mode & 0100) ? 0777 : 0666);
+ fd = open(path, O_CREAT | O_EXCL | O_WRONLY, (mode & 0100) ? 0777 : 0666);
if (fd < 0)
return -1;
while (size) {