sed -e '/RE/r rfile/' needs space in 'r rfile'
[gitweb.git] / builtin-read-tree.c
index 04506da892c1bfb198c706e166efe8a2bf6cf1be..23a8d92a4b77e7436069c976bc5fa0ec162a9324 100644 (file)
@@ -31,8 +31,7 @@ static int merge_size = 0;
 
 static struct object_list *trees = NULL;
 
-static struct cache_entry df_conflict_entry = {
-};
+static struct cache_entry df_conflict_entry;
 
 struct tree_entry_list {
        struct tree_entry_list *next;
@@ -1039,7 +1038,7 @@ int cmd_read_tree(int argc, const char **argv, char **envp)
        }
 
        if (write_cache(newfd, active_cache, active_nr) ||
-           commit_lock_file(&lock_file))
+           close(newfd) || commit_lock_file(&lock_file))
                die("unable to write new index file");
        return 0;
 }