#!/bin/sh
git filter-branch --env-filter '
Nxin_EMAIL="yibihao@nxin.com"
Outlook_EMAIL="yidane@outlook.com"
CORRECT_NAME="yidane"
CORRECT_EMAIL="yidane@163.com"
if [ "$GIT_COMMITTER_EMAIL" = "$Nxin_EMAIL" ]||[ "$GIT_COMMITTER_EMAIL" = "$Outlook_EMAIL" ];then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
fi
if [ "$GIT_AUTHOR_EMAIL" = "$Nxin_EMAIL" ]||[ "$GIT_AUTHOR_EMAIL" = "$Outlook_EMAIL" ];then
export GIT_AUTHOR_NAME="$CORRECT_NAME"
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
fi
' --tag-name-filter cat -- --branches --tags