From d3aa70e3c110a0269d8ce5a6a688bcd0ad27e141 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Wed, 28 Aug 2013 09:35:14 +1000 Subject: [PATCH] Makefile: suppress error messages from 'git'. If you have a clone of the 'wiggle' git tree but with no tags, then "git describe HEAD" will complain fatal: No names found, cannot describe anything. As it produces no output, the compiled in default will be used so this is just an unnecessary message. So send it to /dev/null. Reported-by: Stephen Cameron @ G+ Signed-off-by: NeilBrown --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c64c804..bdc749c 100644 --- a/Makefile +++ b/Makefile @@ -22,8 +22,8 @@ wiggle.o load.o parse.o split.o extract.o diff.o bestmatch.o \ merge2.o vpatch.o :: wiggle.h split.o :: ccan/hash/hash.h config.h -VERSION = $(shell [ -d .git ] && git describe HEAD) -VERS_DATE = $(shell [ -d .git ] && git log -n1 --format=format:%cd --date=short) +VERSION = $(shell [ -d .git ] && git 2> /dev/null describe HEAD) +VERS_DATE = $(shell [ -d .git ] && git 2> /dev/null log -n1 --format=format:%cd --date=short) DVERS = $(if $(VERSION),-DVERSION=\"$(VERSION)\",) DDATE = $(if $(VERS_DATE),-DVERS_DATE=\"$(VERS_DATE)\",) CFLAGS += $(DVERS) $(DDATE) -- 2.39.5