From 58767b663cbc3b9dbd4ae18b9af708c21dc79f57 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Sun, 27 Sep 2026 10:09:30 +0200 Subject: [PATCH] pgit.sh: Stop looking for .git at regular file projects_dir is searched by looking for a directory named .git up the direcctory lineage. That does't work for worktrees, which are regular files pointing back to worktree git dir within the the real git directory. Broaden the check from "test -d .git" to "test -e .git". Signed-off-by: Jan Lindemann --- scripts/pgit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pgit.sh b/scripts/pgit.sh index aa2163ba..70f0ee7b 100644 --- a/scripts/pgit.sh +++ b/scripts/pgit.sh @@ -77,7 +77,7 @@ set_global_variables() projects_dir=`pwd` # If we're in a toplevel directory, suppose projects_dir == project_dirs, # i.e. we only want to target this Git repo - if [ ! -d .git ]; then + if [ ! -e .git ]; then while [ ! -r Makefile ] || ! grep -q 'include $(JWBDIR)/make/projects-dir\.mk\|some-random-string-to-id-this-makefile' Makefile; do [ "$projects_dir" = / ] && fatal "Failed to find projects directory" projects_dir=`dirname $projects_dir` -- 2.56.0