lstat_cache(): print a warning if doing ping-pong between cache types
[gitweb.git] / combine-diff.c
index bccc018ab2666e769e7865d3cad1d61f04443700..4300319cc0fefe0d6f4eb599e24d89e0d01b8985 100644 (file)
@@ -713,9 +713,7 @@ static void show_patch_diff(struct combine_diff_path *elem, int num_parent,
                        result_size = buf.len;
                        result = strbuf_detach(&buf, NULL);
                        elem->mode = canon_mode(st.st_mode);
-               }
-               else if (0 <= (fd = open(elem->path, O_RDONLY)) &&
-                        !fstat(fd, &st)) {
+               } else if (0 <= (fd = open(elem->path, O_RDONLY))) {
                        size_t len = xsize_t(st.st_size);
                        ssize_t done;
                        int is_file, i;