[PATCH util-modular 4/6] release.sh: add support for git worktree
Emil Velikov
emil.l.velikov at gmail.com
Fri Nov 11 15:45:27 UTC 2016
From: Emil Velikov <emil.velikov at collabora.com>
With git worktree(s) .git is a file rather than a directory.
Signed-off-by: Emil Velikov <emil.velikov at 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
More information about the xorg-devel
mailing list