You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for those like me who need something working right now, a workaround is to use git natively
author_name = os.popen(f"cd '{path}'; git --no-pager show -s --format='%aN' {sha1}").read()[0:-1]
author_email = os.popen(f"cd '{path}'; git --no-pager show -s --format='%aE' {sha1}").read()[0:-1]
commit_name = os.popen(f"cd '{path}'; git --no-pager show -s --format='%cN' {sha1}").read()[0:-1]
commit_email = os.popen(f"cd '{path}'; git --no-pager show -s --format='%cE' {sha1}").read()[0:-1]
The text was updated successfully, but these errors were encountered:
in file:
https://github.com/gitpython-developers/GitPython/blob/master/git/util.py
line 537 and 538
since the email regexp ask for one or more characters non-greedy, the regexp will grab
"name <>"
as
name="name <>" email=None
the problem is that the right parse is name="name" email=""
which made my data pipeline produce wrong results, changing those two lines for
that fixes the problem
for those like me who need something working right now, a workaround is to use git natively
author_name = os.popen(f"cd '{path}'; git --no-pager show -s --format='%aN' {sha1}").read()[0:-1]
author_email = os.popen(f"cd '{path}'; git --no-pager show -s --format='%aE' {sha1}").read()[0:-1]
commit_name = os.popen(f"cd '{path}'; git --no-pager show -s --format='%cN' {sha1}").read()[0:-1]
commit_email = os.popen(f"cd '{path}'; git --no-pager show -s --format='%cE' {sha1}").read()[0:-1]
The text was updated successfully, but these errors were encountered: