]> git.neil.brown.name Git - wiggle.git/commitdiff
Makefile: suppress error messages from 'git'.
authorNeilBrown <neilb@suse.de>
Tue, 27 Aug 2013 23:35:14 +0000 (09:35 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 27 Aug 2013 23:35:14 +0000 (09:35 +1000)
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>
Makefile

index c64c804b042a6570cac84314f2c614e5537b14ee..bdc749cdd0016c47deee345fb38a1ebc4962b30f 100644 (file)
--- 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)