diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2023-07-05 21:49:27 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-07-05 23:00:28 +0200 |
commit | 498198453dbb8ae46becbc83a1ef0979a0eb805d (patch) | |
tree | 17d45570180ca97e0cbb1b9106efe2aeda6e1150 /apply.h | |
parent | The fifth batch (diff) | |
download | git-498198453dbb8ae46becbc83a1ef0979a0eb805d.tar.xz git-498198453dbb8ae46becbc83a1ef0979a0eb805d.zip |
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>
Diffstat (limited to 'apply.h')
0 files changed, 0 insertions, 0 deletions