ls-files -k: a directory only can be killed if the index has a non-directory
[gitweb.git] / builtin / ls-files.c
index 22020729cbc35dc5fe11d2a3194fe5994fe67ff9..c7eb6f4873045d787c0c7e4cc80c0209f6b7af83 100644 (file)
@@ -213,6 +213,8 @@ static void show_files(struct dir_struct *dir)
 
        /* For cached/deleted files we don't need to even do the readdir */
        if (show_others || show_killed) {
+               if (!show_others)
+                       dir->flags |= DIR_COLLECT_KILLED_ONLY;
                fill_directory(dir, pathspec);
                if (show_others)
                        show_other_files(dir);