libgit2 / libgit2/pygit2

Mailmap with empty email address is not parsed

Open
#1,264 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.