summaryrefslogtreecommitdiff
path: root/entry.c
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2006-01-05 08:58:06 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-01-06 01:22:47 (GMT)
commit781411ed46400f95c45c5ca103769288025b39d6 (patch)
treeba6966a4f4e7a88b4001f4489a53fb460bbd56b3 /entry.c
parent7f272ca80c1dbb8157e204a821365448eaec52ea (diff)
downloadgit-781411ed46400f95c45c5ca103769288025b39d6.zip
git-781411ed46400f95c45c5ca103769288025b39d6.tar.gz
git-781411ed46400f95c45c5ca103769288025b39d6.tar.bz2
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 'entry.c')
-rw-r--r--entry.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/entry.c b/entry.c
index 15b34eb..410b758 100644
--- a/entry.c
+++ b/entry.c
@@ -60,7 +60,7 @@ static void remove_subtree(const char *path)
static int create_file(const char *path, unsigned int mode)
{
mode = (mode & 0100) ? 0777 : 0666;
- return open(path, O_WRONLY | O_TRUNC | O_CREAT | O_EXCL, mode);
+ return open(path, O_WRONLY | O_CREAT | O_EXCL, mode);
}
static int write_entry(struct cache_entry *ce, const char *path, struct checkout *state)