purge-stale-projects.sh: Keep projects without remote
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m5s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 5m34s
CI / Packaging test (pull_request) Successful in 0s

purge-stale-projects.sh moves every local git project that is missing from
the personal project list on devgit.janware.com into purged/git/, assuming
each local project mirrors a server-side repository. A project without a
remote mirrors nothing, so it cannot be stale, yet it is moved away just
the same.

Skip a project when its Git repository has no remote, and log that it is
left alone. Projects with a remote keep the existing behaviour and are
purged only when they no longer appear in the server's list of personal
projects.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.5.2
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-11-17 13:11:13 +01:00
commit ec00ab9b17
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61

View file

@ -116,6 +116,7 @@ for vcs in $vcss; do
for p in $local_git_proj; do
[ -L $p ] && continue
[ -d $p ] || continue
git -C $p remote | grep -q . || { log "leaving \"$p\" alone, it has no remote"; continue; }
echo $remote_git_proj | grep -q "\(^\| \)$p\($\| \)" && continue
check_scm $p
echo done checking scm