From ec00ab9b1733ee0afbbd07a116afc80a0a595256 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Tue, 17 Nov 2026 13:11:13 +0100 Subject: [PATCH] purge-stale-projects.sh: Keep projects without remote 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 --- scripts/purge-stale-projects.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/purge-stale-projects.sh b/scripts/purge-stale-projects.sh index ee71581a..3e41caa0 100644 --- a/scripts/purge-stale-projects.sh +++ b/scripts/purge-stale-projects.sh @@ -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