From: Emil Velikov <emil.veli...@collabora.com>

With git worktree(s) .git is a file rather than a directory.

Signed-off-by: Emil Velikov <emil.veli...@collabora.com>
---
 release.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/release.sh b/release.sh
index e30aeb2..3384826 100755
--- a/release.sh
+++ b/release.sh
@@ -331,7 +331,10 @@ process_module() {
     # ----- Now in the git module *root* directory ----- #
 
     # Check that this is indeed a git module
-    if [ ! -d .git ]; then
+    # Don't assume that $(top_srcdir)/.git is a directory. It may be
+    # a gitlink file if $(top_srcdir) is a submodule checkout or a linked
+    # worktree.
+    if [ ! -e .git ]; then
        echo "Error: there is no git module here: `pwd`"
        return 1
     fi
-- 
2.10.2

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to