Tools: correct author name formatting

prevent error
fatal: --author 'pierre.kancir.emn@gmail.com' n'est pas de la forme 'Nom <email>' ni ne correspond à aucun auteur existant
This commit is contained in:
Pierre Kancir 2021-08-06 15:45:39 +02:00 committed by Peter Barker
parent 44d5885d99
commit 231ee84ab9
1 changed files with 4 additions and 2 deletions

View File

@ -56,7 +56,9 @@ if $option_copy && $option_edit; then
exit 1
fi
author=$(git log -n 1 --format=%ae)
author_name=$(git log -n 1 --format=%an)
author_email=$(git log -n 1 --format=%ae)
author="$author_name <$author_email>"
git log -n 1 --format=%B > "$MSG_FILE"
if $option_edit; then
@ -86,7 +88,7 @@ fi
HEAD=$(git rev-parse HEAD)
git reset HEAD~1 --soft
if ! "$SCRIPT_DIR/git-commit-subsystems" -F "$MSG_FILE" --author=$author; then
if ! "$SCRIPT_DIR/git-commit-subsystems" -F "$MSG_FILE" --author="$author"; then
echo "Error on calling git-commit-subsystems." >&2
git reset $HEAD
exit 1