Re: [PATCH 1/4] Add support for SUNIX Multi-I/O board
From: Enrico Weigelt, metux IT consult
Date: Fri Apr 05 2019 - 04:46:17 EST
On 02.04.19 08:19, Lee Jones wrote:
> Please use `git format-patch` and `git send-email` to create and
> submit your patches. Use the following flags; --annotate, --compose
> and --thread to ensure the patches are sent a) pinned to each other so
> they do not become spread throughout people's inboxes and b) a cover
> letter is provided which should contain a summary of what you are
> trying to achieve.
here's a little script which helps w/ that: it automatically picks
the corresponding maintainers/maillists, you can also pass the usual
git-send-email flags.
--mtx
--
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@xxxxxxxxx -- +49-151-27565287
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
[ -x "$GIT" ] || export GIT=git
[ -d "$KERNELSRC" ] || export KERNELSRC=.
LKML="linux-kernel@xxxxxxxxxxxxxxx"
check_ksrc() {
if [ -d $KERNELSRC/arch ] && \
[ -d $KERNELSRC/block ] && \
[ -d $KERNELSRC/init ] && \
[ -d $KERNELSRC/kernel ] && \
[ -d $KERNELSRC/sound ] && \
[ -d $KERNELSRC/drivers ] && \
[ -d $KERNELSRC/net ] && \
[ -d $KERNELSRC/include ] && \
[ -f $KERNELSRC/COPYING ] && \
[ -f $KERNELSRC/MAINTAINERS ] && \
[ -f $KERNELSRC/CREDITS ] && \
[ -f $KERNELSRC/Kconfig ] && \
[ -f $KERNELSRC/Makefile ]; then
return 0
else
echo "$0: cant find the kernel source tree. please call me from the topdir" >&2
exit 1
fi
}
check_ksrc
get_files() {
$GIT diff --name-only "$REF"
}
get_maintainers() {
$KERNELSRC/scripts/get_maintainer.pl --m --l --remove-duplicates `get_files` |
grep -v "$LKML" | \
grep -E "(maintainer|reviewer|open list)" | \
grep -o '[[:alnum:]+\.\_\-]*@[[:alnum:]+\.\_\-]*'
}
construct_params() {
echo -n "--to=$LKML "
for a in $MAINTAINERS; do
echo -n "--cc=$a "
done
}
if [ ! "$1" ]; then
echo "$0: missing git revision to send out" >&2
echo "" >&2
echo "for example: 'HEAD^' for sending just the last patch" >&2
echo >&2
echo "$0 <git-ref> [<extra params for git-send-mail>]"
exit 1
fi
REF="$1"
shift
echo "scanning for maintainers ..." >&2
MAINTAINERS=`get_maintainers`
echo "sending mail ..." >&2
$GIT send-email `construct_params` "$REF" "$@"