From ca1efdcecdac3348b1125fcd0266ab12cfc20154 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 6 Dec 2017 21:23:19 -0600 Subject: [PATCH] Correctly determine git SHA if libdivecomputer is a git submodule In the case of a submodule, the .git file is a text file pointing to the correct module in the parent's .git folder. The git rev-parse works correctly in both cases. Signed-off-by: Dirk Hohndel --- src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 586b89b..3b1357b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -100,7 +100,7 @@ libdivecomputer.lo: revision.h FORCE: $(top_srcdir)/revision: FORCE - @if (test -d $(top_srcdir)/.git && cd $(top_srcdir) \ + @if (test -e $(top_srcdir)/.git && cd $(top_srcdir) \ && git rev-parse --verify HEAD) > revision-t 2>/dev/null \ && ! cmp -s revision-t $@; then \ mv -f revision-t $@; \