From 781411ed46400f95c45c5ca103769288025b39d6 Mon Sep 17 00:00:00 2001 From: Alex Riesen Date: Thu, 5 Jan 2006 09:58:06 +0100 Subject: trivial: O_EXCL makes O_TRUNC redundant Signed-off-by: Alex Riesen Signed-off-by: Junio C Hamano --- entry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'entry.c') diff --git a/entry.c b/entry.c index 15b34eb6f9..410b758aab 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) -- cgit v1.2.3