X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=entry.c;h=410b758aab7efc6d777f0344500f97b1cbc52946;hb=d5a6aafc90a14382120727e4e81ee1a380e8b194;hp=15b34eb6f9ac1db569487a3b732740f2d35831a7;hpb=4b12dae69a41471e7c8139de26c1135f7ecccbd8;p=git.git diff --git a/entry.c b/entry.c index 15b34eb6..410b758a 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)