diff --git a/scripts/pgit.sh b/scripts/pgit.sh index 8db94966..f4171a05 100644 --- a/scripts/pgit.sh +++ b/scripts/pgit.sh @@ -40,7 +40,7 @@ config() run_git() { marker git "$@" - eval git "$@" + git "$@" } # ------------- commands @@ -59,6 +59,23 @@ run() done )} +commit() +{( + local d + + config + cd $pdir + + if [ "$PGIT_KEEP_GOING" != y ]; then set -e; fi + for d in $pdirs; do + if run_git -C $d diff --quiet; then + log "Nothing to commit" + continue + fi + run_git -C $d commit "$@" + done +)} + clone() {( local p @@ -129,7 +146,7 @@ SSH=ssh cmd=$1 shift case $cmd in - clone|diff) + clone|diff|commit) $cmd "$@" ;; *)