Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
diff --no-index: refuse to compare stdin to a directory
When the user runs git diff --no-index file directory we follow the behavior of POSIX diff and rewrite the arguments as git diff --no-index file directory/file Doing that when "file" is "-" (which means "read from stdin") does not make sense so we should error out if the user asks us to compare "-" to a directory. This matches the behavior of GNU diff and diff on *BSD. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
- Loading branch information