Mailmap with empty email address is not parsed
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 408
- Avg merge
- 2d 57m
- Merged PRs (30d)
- 7
Description
Environment:
- Debian sid
- Python 3.11.6
- libgit2-1.7.1+ds-2
- pygit2 1.13.3-1+b1
Test case:
from pygit2 import Mailmap
Mailmap.from_buffer("RealName <real.address@domain.com> oldname <>")
Result:
ValueError: invalid argument: 'replace_email && *replace_email'
Expected result:
This syntax is accepted by Git (mapped names are shown in git log). Empty emails should be allowed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Mailmap.from_buffer entry point and reproduce the provided mapping with an empty replacement email. Trace how the empty address is parsed and validated; done means the example is accepted without ValueError and the resulting mapping matches Git's behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100