From: NeilBrown Date: Tue, 27 Aug 2013 23:35:14 +0000 (+1000) Subject: Makefile: suppress error messages from 'git'. X-Git-Tag: v1.1~11 X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=d3aa70e3c110a0269d8ce5a6a688bcd0ad27e141;p=wiggle.git 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 --- 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)