1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-07 12:46:12 +02:00

Makefile: fix misdirected redirections

In general "echo 2>&1 $msg" to redirect a possible error message
that comes from 'echo' itself into the same standard output stream
$msg is getting written to does not make any sense; it is not like
we are expecting to see any errors out of 'echo' in these statements,
and even if it were the case, there is no reason to prevent the
error messages from being sent to the standard error stream.

These are clearly meant to send the argument given to echo to the
standard error stream as error messages.  Correctly redirect by
saying "send what is written to the standard output to the standard
error", i.e. "1>&2" aka ">&2".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano 2016-04-05 00:02:14 -07:00
parent 765428699a
commit d55de70a1e

View File

@ -2211,10 +2211,10 @@ sparse: $(SP_OBJ)
check: common-cmds.h
@if sparse; \
then \
echo 2>&1 "Use 'make sparse' instead"; \
echo >&2 "Use 'make sparse' instead"; \
$(MAKE) --no-print-directory sparse; \
else \
echo 2>&1 "Did you mean 'make test'?"; \
echo >&2 "Did you mean 'make test'?"; \
exit 1; \
fi