[vlc-commits] Fix compilation from a git worktree

Romain Vimont git at videolan.org
Mon Jun 3 09:26:18 CEST 2019


vlc | branch: master | Romain Vimont <rom1v at videolabs.io> | Wed May 29 11:29:43 2019 +0200| [3ed4d70a15c14c6b963813680c02cb2790d88100] | committer: Steve Lhomme

Fix compilation from a git worktree

>From within a git worktree, "git describe" failed due to the explicit
--git-dir option:

      GEN      stamp-revision
    fatal: not a git repository: '../../.git/'

Let git find the actual git dir by just providing the path (-C) from
which we want to execute the git command.

(cherry picked from commit c6ca71e024893ec9addae4258661f8e22ef910aa)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3ed4d70a15c14c6b963813680c02cb2790d88100
---

 src/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index f39793aa0c..663bbd4eb5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -632,7 +632,7 @@ $(srcdir)/revision.txt:
 stamp-revision:
 	$(AM_V_at)rm -f -- revision.tmp
 	$(AM_V_GEN)if ! git \
-			--git-dir="$(top_srcdir)/.git" describe \
+			-C "$(top_srcdir)" describe \
 			--tags --long --match '?.*.*' --always; then \
 		cat $(srcdir)/revision.txt ; \
 	fi > revision.tmp



More information about the vlc-commits mailing list