unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: notmuch@notmuchmail.org
Cc: tomi.ollila@iki.fi
Subject: [PATCH 1/3] Makefile.local: set IS_GIT = yes when regular file $srcdir/.git exists
Date: Thu, 26 May 2016 00:04:30 +0300	[thread overview]
Message-ID: <1464210272-26281-1-git-send-email-tomi.ollila@iki.fi> (raw)

$srcdir/.git may also be file. E.g. `git worktree` creates .git file
while new working tree is populated.
---

This first patch is useful for developers/testers who use git worktree
to get accurate version information. rest are not in such a hurry
(to be tested, I'll have these in by build circle around).

 Makefile.local | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.local b/Makefile.local
index 6b413420b8d9..a1e9578441a4 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -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)
-- 
2.8.2

             reply	other threads:[~2016-05-25 21:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-25 21:04 Tomi Ollila [this message]
2016-05-25 21:04 ` [PATCH 2/3] Makefile.local: make IS_GIT simply expanded Tomi Ollila
2016-05-25 21:04 ` [PATCH 3/3] Makefile.local: use $(wildcard) to check existence of ${srcdir}/.git Tomi Ollila
2016-06-11 16:25 ` [PATCH 1/3] Makefile.local: set IS_GIT = yes when regular file $srcdir/.git exists David Bremner
2016-09-04 11:21   ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1464210272-26281-1-git-send-email-tomi.ollila@iki.fi \
    --to=tomi.ollila@iki.fi \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).