]> rtime.felk.cvut.cz Git - notmuch.git/commitdiff
Makefile.local: set IS_GIT = yes when regular file $srcdir/.git exists
authorTomi Ollila <tomi.ollila@iki.fi>
Wed, 25 May 2016 21:04:30 +0000 (00:04 +0300)
committerDavid Bremner <david@tethera.net>
Sat, 11 Jun 2016 16:13:48 +0000 (13:13 -0300)
$srcdir/.git may also be file. E.g. `git worktree` creates .git file
while new working tree is populated.

Makefile.local

index cf16185e3daacdf1a37418019423e78bc8941e0c..f2ad0c12de677bfd38966f16ccfc933af1b9b6e4 100644 (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)