mergestat-lite
mergestat-lite copied to clipboard
author_email null
Hi,
i was trying to export data using the following command
$ mergestat export puppet-mergestat.sqlit \
-e blame \
-e "SELECT files.path, blame.line_no, commits.hash, commits.author_email FROM files, blame('', '', files.path) JOIN commits ON commits.hash = blame.commit_hash" \
-r git/puppet
however i noticed that for many of the entries the author_email
field is null
. The following is a specific example of a query that returns a null
author_email
$ mergestat "select author_email from commits('https://github.com/wikimedia/puppet') where hash = 'ecd5036b430abafd88ef26dd43b257b8e5187d29'"
From the raw commit I can see that the email address is present. Am i missing something or is this perhaps a bug?
Thanks
Hi @b4ldr thanks for bringing this up - this looks like a bug. I was able to reproduce your issue (null
author_email
on that specific commit in your repo - when it in fact should have an email).
On first pass, it seems to be a bug in how we're handling .mailmap
files, as adding the --skip-mailmap
seems to "solve" the issue (an email now appears when I execute the same query).
I will mark this as a bug and find time to investigate what's going on. Thanks for submitting. In the meantime, is adding the --skip-mailmap
flag sufficient to unblock your use case? That will tell mergestat
not to apply email mappings found in a .mailmap
file, and just display what's stored in the commit
@patrickdevivo thanks for the quick response, ill re-generate the export tonight (it takes a few hours) and let you know and please let me know if you would like me to do any other testing
@patrickdevivo sorry for the delay, confirming that adding --skip-mailmap
solves the issue for me
I'm running into this issue with the summarize command too.
Did a brew install mergestat
and ran the following in my local git repo.
➜ mergestat summarize commits --skip-mailmap
➜ ERR sql: Scan error on column index 1, name "author_email": converting NULL to string is unsupported
Any updates on this issue?
This PR addresses this issue and has just been released in the latest version 0.6.1 of mergestat-lite!