]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] Makefile: git-log may return multiple dates in case of merges.
authorWilly Tarreau <w@1wt.eu>
Sat, 6 Jan 2007 23:43:29 +0000 (00:43 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 7 Jan 2007 01:08:22 +0000 (02:08 +0100)
Makefile

index 906e8ee95dc8993a6de90ba4fbb86ba430a54cc5..195e6a9fca195cfc73fdfd407e4ad52f0d288836 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -103,7 +103,7 @@ endif
 ifneq ($(VERSION),)
 # OK git is there and works.
 SUBVERS := $(shell comms=$$(git-log --no-merges v$(VERSION).. 2>/dev/null |grep -c ^commit ); [ $$comms -gt 0 ] && echo "-$$comms" )
-VERDATE := $(shell date +%Y/%m/%d -d "$$(git-log HEAD^.. 2>/dev/null | grep ^Date: | cut -f2- -d: | cut -f1 -d+)" )
+VERDATE := $(shell date +%Y/%m/%d -d "$$(git-log HEAD^.. 2>/dev/null | grep -m 1 ^Date: | cut -f2- -d: | cut -f1 -d+)" )
 else
 # Otherwise, use the hard-coded version of last tag, number of changes
 # since last tag, and release date.