4 echo "Usage: git-request-pull-send-email <commit> [branch]"
9 eval set -- `getopt -- eh "$@"`
10 while [[ -n $1 ]] ; do
21 commit
=${1:-mainline/master}
22 url
=$
(git config
--get remote.origin.url
)
24 if [[ ${branch} != master
]] ; then
25 subject
=" (${branch} branch)"
30 if [[ -z ${commit} ]] ||
[[ -n $3 ]] ; then
34 name
=$
(git config
--get user.name
)
35 email
=$
(git config
--get user.email
)
37 request
=$
(PAGER
= git request-pull
${commit} ${url} ${branch}) ||
exit 1
39 From: ${name} <${email}>
41 Subject: Pull request ${url##*/}${subject}
47 to
=$
(git config
--get sendemail.pullrequest
)
48 cc
=$
(git config
--get sendemail.to || git config
--get sendemail.pullrequestcc
)
50 git send-email
--to "${to}" --cc "${cc}" ${tmp}
52 echo git send-email --to \"${to}\" --cc \"${cc}\" ... 1>&2