-/*
- * Decide what to do when we find a file while traversing the
- * filesystem. Mostly two cases:
- *
- * 1. We are looking for ignored files
- * (a) File is ignored, include it
- * (b) File is in ignored path, include it
- * (c) File is not ignored, exclude it
- *
- * 2. Other scenarios, include the file if not excluded
- *
- * Return 1 for exclude, 0 for include.
- */
-static int treat_file(struct dir_struct *dir, struct strbuf *path, int exclude)
-{
- /* Always exclude indexed files */
- if (index_name_exists(&the_index, path->buf, path->len, ignore_case))
- return 1;
-
- return exclude == !(dir->flags & DIR_SHOW_IGNORED);
-}
-