We've given options to diff that will only result in `GIT_FILEMODE_TREE` items being included in the diff if they were directories that contained a `.git` entry. For all other files, the diff will have recursed into the directory and returned the items in it. As a result, the right thing to do here is just skip the TREE entries.