Le 02/04/2024 à 12:41, Michael Tokarev a écrit :

Author: Stefan Weil via <qemu-triv...@nongnu.org>

*SIGH*  This happened *again*.

(you'll need to tell git log "--no-mailmap" to not get confused
by the mapping we have for the last time one of these slipped
through...)

Now this is interesting.  And this is exactly why I haven't noticed
it - I did pay attention to Author lines this time.  -- because
it is displayed with mailmap applied.  How very useful.

I have to use `git show --no-mailmap' to see the original " via.."
version.


To post PR I generally use git-publish and I have a hook that checks that.

$ cat .git/hooks/pre-publish-send-email
!/bin/bash

NAME=$(git config --get user.name)
EMAIL=$(git config --get user.email)

for PATCH in $1/*.patch; do
    if [ $(basename $PATCH) = "0000-cover-letter.patch" ]; then
        continue
    fi
    if ! grep -q "^Signed-off-by: $NAME <$EMAIL>" $PATCH; then
        echo "Error: Missing sender S-o-B in $PATCH"
        exit 1
    fi
    if grep "^From: " $PATCH | grep -q "<qemu-devel@nongnu.org>" ; then
        echo "Error: Author email address is mangled by the mailing list in 
$PATCH"
        exit 1
    fi
done
exit 0


Reply via email to