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 <neilb@suse.de>
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)