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: die on error reading stdin
If there is an error when reading from stdin then "diff --no-index" prints an error message but continues to try and diff a file named "-" resulting in an error message that looks like error: error while reading from stdin: Invalid argument fatal: stat '-': No such file or directory assuming that no file named "-" exists. If such a file exists it prints the first error message and generates the diff from that file which is not what the user wanted. Instead just die() straight away if we cannot read from stdin. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
- Loading branch information