Makefile.local: set IS_GIT = yes when regular file $srcdir/.git exists

$srcdir/.git may also be file. E.g. `git worktree` creates .git file
while new working tree is populated.
This commit is contained in:
Tomi Ollila 2016-05-26 00:04:30 +03:00 committed by David Bremner
parent 2333a44ab7
commit 57bd4cf322

View file

@ -10,7 +10,7 @@
# repository), we let git append identification of the actual commit.
PACKAGE=notmuch
IS_GIT=$(shell if [ -d ${srcdir}/.git ] ; then echo yes ; else echo no; fi)
IS_GIT=$(shell if [ -d ${srcdir}/.git -o -f ${srcdir}/.git ] ; then echo yes ; else echo no; fi)
ifeq ($(IS_GIT),yes)
DATE:=$(shell git --git-dir=${srcdir}/.git log --date=short -1 --pretty=format:%cd)