Teach Git to respect skip-worktree bit (reading part)
[gitweb.git] / builtin-ls-files.c
index c1afbad453ae967efbe735b3f763ef17b3562d2e..ad7e44784f1b067f79333f22232e52e20642ab95 100644 (file)
@@ -194,6 +194,8 @@ static void show_files(struct dir_struct *dir, const char *prefix)
                                continue;
                        if (ce->ce_flags & CE_UPDATE)
                                continue;
+                       if (ce_skip_worktree(ce))
+                               continue;
                        err = lstat(ce->name, &st);
                        if (show_deleted && err)
                                show_ce_entry(tag_removed, ce);