purge-stale-projects.sh: Ignore untracked files

Untracked files flag a git repository as unfit for purging, don't do that. We
don't care for untracked files.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2021-01-30 13:05:58 +00:00
commit e3489d6222

View file

@ -22,7 +22,7 @@ check_scm()
if [ -d $p/.git ]; then
log + checking git
#git -C $p pull --no-edit || fatal "git pull failed, giving up"
if git -C $p status --porcelain | grep -v '^??' | grep -q . ; then
if git -C $p status --porcelain --untracked-files=no | grep -v '^??' | grep -q . ; then
git -C $p status
fatal "git in project \"$p\" has locally modified files, giving up"
fi