From e3489d62220090c4ce1930164ae8bac625aa96d4 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Sat, 30 Jan 2021 13:05:58 +0000 Subject: [PATCH] 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 --- scripts/purge-stale-projects.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/purge-stale-projects.sh b/scripts/purge-stale-projects.sh index 26bbcb67..62190165 100644 --- a/scripts/purge-stale-projects.sh +++ b/scripts/purge-stale-projects.sh @@ -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