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 <jan@janware.com>
This commit is contained in:
parent
6fe9eeb546
commit
ec00ab9b17
1 changed files with 1 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue