@joe-gordon0 a merge request would be helpful in explaining the difference between the proposed flag and the existing --diff flag (because I've honestly forgotten how it differs since we last talked about this). Relatedly, the comment in that patch set doesn't explain how what you're doing there differs from --diff.
Currently flake8 -diff takes a diff as stdin. So git diff HEAD^ | flake8 -diff Then pep8 (as part of flake8) extracts the filenames from the diff, excludes any that do not match the filename filter (so we can ignore things that aren't python files etc.) and then runs pep8/flake8 against those files (as read from the filesystem -- which isn't obvious).
The idea here is to add support to flake8 to do the same thing without having to do manually call 'git diff HEAD^' and teach flake8 to detect if its running on files in a VCS and automatically extract the right files to run against.
This would allow users to trivially run flake8 on just the changed files any time they want. Instead of just in pre-commit git hook.
Another option is to just better document how to do this in flake8's documentation. The same thing can easily be made easier via git aliases:
So as you pointed out, the --diff handling is part of pep8. There's no reason flake8 couldn't detect the usage of --diff sans stdin and not try to find a vcs to pull the diff from. We already have VCS discovery code for the --install-hook option.