Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-04-05 10:02:14 +0300
committerJunio C Hamano <gitster@pobox.com>2016-04-05 10:03:05 +0300
commitd55de70a1edf885fd0c45c9e20a3a00c3f886607 (patch)
treeca637aaaea52410b6c3f0e205dc8336d3a0a5f04 /Makefile
parent765428699a5381f113d19974720bc91b5bfeaf1d (diff)
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>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 8700db8d42..296f17528c 100644
--- a/Makefile
+++ b/Makefile
@@ -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