bin/fix-wrong-emails: Add script

Will update that script soon as more spelling bugs went
brrr on either committer, author or both.

Signed-off-by: Andrei Jiroh Eugenio Halili <andreijiroh@madebythepins.tk>
This commit is contained in:
Andrei Jiroh Eugenio Halili 2021-02-18 22:26:26 +08:00
parent 3c702980fd
commit 9a3ec9da4a
Signed by: ajhalili2006
GPG Key ID: A30EBE40AD856D88
1 changed files with 16 additions and 0 deletions

16
bin/fix-wrong-emails Executable file
View File

@ -0,0 +1,16 @@
git filter-branch --env-filter '
WRONG_EMAIL="andreijiroh@mafebythepins.tk"
NEW_NAME="Andrei Jiroh Eugenio Halili"
NEW_EMAIL="andreijiroh@madebythepins.tk"
if [ "$GIT_COMMITTER_EMAIL" = "$WRONG_EMAIL" ]
then
export GIT_COMMITTER_NAME="$NEW_NAME"
export GIT_COMMITTER_EMAIL="$NEW_EMAIL"
fi
if [ "$GIT_AUTHOR_EMAIL" = "$WRONG_EMAIL" ]
then
export GIT_AUTHOR_NAME="$NEW_NAME"
export GIT_AUTHOR_EMAIL="$NEW_EMAIL"
fi
' --tag-name-filter cat -- --branches --tags