author | Junio C Hamano <gitster@pobox.com> | |
Sat, 26 Dec 2009 21:53:17 +0000 (13:53 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 26 Dec 2009 21:59:34 +0000 (13:59 -0800) | ||
commit | eca4460eeb18b895cb6ca590490073f75fd010a6 | |
tree | 355b127ca87f13e96d2e3355cbe66b17a889e989 | tree | snapshot |
parent | 15caa41053c465aeabb1a0d2d3d3c12d701bc62d | commit | diff |
t4019 "grep" portability fix
Input to "grep" is supposed to be "text", but we deliberately feed output
from "git diff --color" to sift it into two sets of lines (ones with
errors, the other without). Some implementations of "grep" only report
matches with the exit status, without showing the matched lines in their
output (e.g. OpenBSD 4.6, which says "Binary file .. matches").
Fortunately, "grep -a" is often a way to force the command to treat its
input as text.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Input to "grep" is supposed to be "text", but we deliberately feed output
from "git diff --color" to sift it into two sets of lines (ones with
errors, the other without). Some implementations of "grep" only report
matches with the exit status, without showing the matched lines in their
output (e.g. OpenBSD 4.6, which says "Binary file .. matches").
Fortunately, "grep -a" is often a way to force the command to treat its
input as text.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4019-diff-wserror.sh | diff | blob | history |