Web lists-archives.com

Misleading documentation for git-diff-files (diff-filter)

I originally asked this question on stackoverflow

I wanted to know if git diff-files shows files that are not in the
index but are in the working tree. The documentation says you can
supply --diff-filter=A, which will select file "that are added".
However, git-diff-files (appears) to never show any files with the
status of "A".

It seems like the cause is that git diff-files includes
diff-options.txt which uses a standard template for --diff-filter
which includes the "A" option. Perhaps a clarification can be added?

Compares the files in the working tree and the index.  When paths
are specified, compares only those named paths.  Otherwise all
entries in the index are compared.  The output format is the
same as for 'git diff-index' and 'git diff-tree'. Files not in the index are
not compared.

John L Cheng