pgit.sh: Honour PGIT_IGNORE for pgit.sh commit

PGIT_INGORE is not honoured for pgit.sh commit, fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-04-04 18:18:09 +02:00
commit 1da3f37889

View file

@ -144,6 +144,7 @@ cmd_exec()
cmd_commit() cmd_commit()
( (
local d do_cvs local d do_cvs
local ignore="$PGIT_IGNORE"
if [ "$1" = --cvs ]; then if [ "$1" = --cvs ]; then
do_cvs=true do_cvs=true
@ -156,6 +157,10 @@ cmd_commit()
if [ "$PGIT_KEEP_GOING" != y ]; then set -e; fi if [ "$PGIT_KEEP_GOING" != y ]; then set -e; fi
for d in $project_dirs; do for d in $project_dirs; do
cur=`expr $cur + 1` cur=`expr $cur + 1`
if echo $ignore | grep -q "\b$d\b"; then
marker "$d is in PGIT_IGNORE, not committing anything"
continue
fi
if run_git -C $d diff-index --quiet HEAD --; then if run_git -C $d diff-index --quiet HEAD --; then
log "Nothing to commit" log "Nothing to commit"
continue continue