On Thu, 19 Sep 2019, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote: > Hi Jani, > > On Thu, Sep 19, 2019 at 10:49 AM Jani Nikula <jani.nikula@xxxxxxxxx> wrote: >> On Thu, 19 Sep 2019, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote: >> > On Thu, Sep 19, 2019 at 8:57 AM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote: >> >> On Wed, Sep 18, 2019 at 10:57:28AM -0300, Mauro Carvalho Chehab wrote: >> >> When I sent a patch, I use get_maintainer.pl then I add whoever the >> >> wrote the commit from the Fixes tag. Then I remove Colin King and Kees >> >> Cook from the CC list because they worked all over the tree and I know >> >> them. I also normally remove LKML if there is another mailing list but >> >> at least one subsystem uses LKML for patchwork so this isn't safe. >> >> >> >> So the safest instructions are "Use get_matainer.pl and add the person >> >> who wrote the commit in the Fixes tag". >> > >> > Better: perhaps get_maintainer.pl can be taught to add the author of the >> > commit pointed to by the Fixes tag, if present? >> >> The drm maintainer tools [1] have that, with Cc's and reviewers picked >> up, and appropriate Cc: stable added. On a random commit from v5.3: > > Thanks, but that's not scripts/get_maintainer.pl, and restricted to one out > of N subsystems. Not so dissimilar from what Dan was complaining about. The point was, perhaps poorly conveyed, to provide it as a reference, and something to steal from. You can think of it as a wrapper around get_maintainer.pl, it's really not subsystem specific, though part of our scripts, and it'll take you all of five minutes to make it generic from the source (MIT): function dim_cite { local sha1 sha1=${1:?$usage} git --git-dir="$DIM_PREFIX/$DIM_REPO/.git" log -1 $sha1 \ "--pretty=format:%H (\"%s\")%n" | \ sed -e 's/\([0-f]\{12\}\)[0-f]*/\1/' } function dim_fixes { local sha1 tag sha1=${1:?$usage} cd $DIM_PREFIX/$DIM_REPO echo "Fixes: $(dim_cite $sha1)" ( git show --no-patch $sha1 | \ sed -e 's/\(Reviewed\|Acked\|Reported\|Signed\)[a-zA-Z-]*-by:/Cc:/' | \ sed -e 's/^ C[Cc]: */Cc: /' | grep '^Cc: ' git show $sha1 | scripts/get_maintainer.pl --email --norolestats --pattern-depth 1 | sed -e "s/^/Cc: /" ) | awk '!x[$0]++' tag=$(git tag --contains $sha1 | grep ^v | sort -V | head -n 1) if [[ -n "$tag" ]]; then if ! echo "$tag" | grep -q -e "-rc"; then echo "Cc: <stable@xxxxxxxxxxxxxxx> # ${tag}+" fi fi } HTH, Jani. -- Jani Nikula, Intel Open Source Graphics Center