Web lists-archives.com

Re: [PATCH v2 1/2] fsexcludes: add a programmatic way to exclude files from git's working directory traversal logic

On 4/11/2018 7:52 PM, Junio C Hamano wrote:
@@ -2011,6 +2028,8 @@ static enum path_treatment read_directory_recursive(struct dir_struct *dir,
  		/* add the path to the appropriate result list */
  		switch (state) {
  		case path_excluded:
+			if (fsexcludes_is_excluded_from(istate, path.buf, path.len, DTYPE(cdir.de)) > 0)
+				break;

Then the use of DTYPE() looks a bit odd here.  On
NO_D_TYPE_IN_DIRENT platforms, we would get DT_UNKNOWN out of it and
then end up passing DT_UNKNOWN to the function.

Good catch. I was trying to optimize this path and didn't realize the platform implications of using DTYPE(). I'll update it to match the others.