gotec / git2net

An Open Source Python package for the extraction of fine-grained and time-stamped co-editing networks from git repositories.
https://git2net.readthedocs.io
GNU Affero General Public License v3.0
53 stars 16 forks source link

passing through the check-mailmap error when author is - #38

Closed wschuell closed 1 year ago

wschuell commented 1 year ago

Linked to issue https://github.com/gotec/git2net/issues/37

The process_commit method detects author or committer having - as both email and name (which would trigger an error in git check-mailmap), prints a message to stdout and returns empty dataframes (same behavior as timeouts).

gotec commented 1 year ago

Having an author name start with "-" is not possible based on the git function. The leading dash will be interpreted as option and I could not find any way to escape it.

The next best thing we can do is to only consider the email for the mailmap check, which is always possible. There was already a check for "--" in the mailmap check which I have updated to also check for "-".

The error in issue #37 is now no longer reproduced and the commit mines correctly. I argue that this solution is cleaner as the one you propose here.

wschuell commented 1 year ago

Agree, thanks for the clarification!