I'm using git filter-repo to rewrite the emails of the commit authors on a git repository.
The commit.author_email
field is in this format:
AA01\myuserid
Yes, I know that this does not resemble an email address but it is what it is. What I need to achieve is setting the commit author's email to the second part of the commit.author_email
field (e.g. myuserid
)
This is the command I'm executing to split
git filter-repo --force --refs master --commit-callback '
>> commit.author_email_split = commit.author_email.split("\\")
>> '
For now, I just want to let the split work but it fails with the error below:
Traceback (most recent call last):
File "C:\git-filter-repo\git-filter-repo", line 4005, in <module>
main()
File "C:\git-filter-repo\git-filter-repo", line 4001, in main
filter = RepoFilter(args)
File "C:\git-filter-repo\git-filter-repo", line 2760, in __init__
self._handle_arg_callbacks()
File "C:\git-filter-repo\git-filter-repo", line 2865, in _handle_arg_callbacks
handle('commit')
File "C:\git-filter-repo\git-filter-repo", line 2858, in handle
setattr(self, callback_field, make_callback(type, code_string))
File "C:\git-filter-repo\git-filter-repo", line 2841, in make_callback
' '+'\n '.join(str.splitlines()), globals())
File "<string>", line 3
commit.author_email_split = commit.author_email.split(\)
^
SyntaxError: unexpected character after line continuation character
I tried checking an re-checking the command syntax, the presence of hidden chars and so on but nothing works. What can be the problem here?