SZEDER Gábor <szeder.dev@xxxxxxxxx> writes: > On Sun, Feb 17, 2019 at 08:49:39AM -0500, Joe Ranieri wrote: >> "git ls-files -m" can show deleted files, despite -d not having been >> specified. > > To my understanding that's intentional: a deleted file is considered > modified, because its content clearly doesn't match the tracked > content. Hmph, I am not so sure about that. It seems that b0391890 ("Show modified files in git-ls-files", 2005-09-19) fixes one of its draft version's bugs in "http://public-inbox.org/git/43179E59.80106@xxxxxxxxxxxxx/" by not letting it use ce_match_stat() directly, but introducing ce_modified() that inspects the data for actual changes. The effort however did not spot the other bug, namely, lstat() returning an error for ENOENT. I think the original intent was for "ls-files -d", "ls-files -m" and "ls-files -d m" all can be used in a meaningful way by keeping these two selectors independent. The buggy implementation did not realize that intent correctly, though.