pgit.sh: Stop looking for .git at regular file
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m38s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m52s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m15s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m57s
CI / Packaging test (push) Successful in 0s
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m38s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m52s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m15s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m57s
CI / Packaging test (push) Successful in 0s
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 <jan@janware.com>
This commit is contained in:
parent
6c2c32adaa
commit
58767b663c
1 changed files with 1 additions and 1 deletions
|
|
@ -77,7 +77,7 @@ set_global_variables()
|
||||||
projects_dir=`pwd`
|
projects_dir=`pwd`
|
||||||
# If we're in a toplevel directory, suppose projects_dir == project_dirs,
|
# If we're in a toplevel directory, suppose projects_dir == project_dirs,
|
||||||
# i.e. we only want to target this Git repo
|
# 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
|
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" = / ] && fatal "Failed to find projects directory"
|
||||||
projects_dir=`dirname $projects_dir`
|
projects_dir=`dirname $projects_dir`
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue