#!/bin/sh - # Sane wrapper around git send-email. # # Example: # send-email " v2" HEAD~10 libguestfs@redhat.com CC@example.com CC@bar.example.com # To test, send it to yourself first: # send-email " v2" HEAD~10 rjones@redhat.com set -e smtp=smtp.corp.redhat.com if [ $# -lt 3 ]; then echo "send-email: Read the script first." exit 1 fi subject_prefix="--subject-prefix=PATCH$1" shift # Arguments. range="$1" shift to="$1" shift cc="" for x in "$@"; do cc="$cc --cc=$x" done git send-email \ --compose \ --stat \ --thread --no-chain-reply-to \ --envelope-sender="rjones@redhat.com" \ --smtp-server=$smtp \ "$subject_prefix" \ --from="Richard W.M. Jones " \ --to="$to" $cc \ "$range"