mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-09-20 23:11:29 +02:00
More stable author email extraction.
The email search regular expression in the git-blame output can be tripped by a similar pattern appearing in the source code. The supplied patch fixes the problem. Signed-off-by: Adam Waldenberg <adam.waldenberg@ejwa.se>
This commit is contained in:
parent
d6a2f33de5
commit
b20f15e794
@ -143,8 +143,8 @@ class Blame:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_author_email(string):
|
def get_author_email(string):
|
||||||
author_email = re.search(" \((.*?)\d\d\d\d-\d\d-\d\d", string)
|
author_email = re.search("^[0-9a-f]{8} \(<([^>]*)", string)
|
||||||
return author_email.group(1).strip().lstrip("<").rstrip(">")
|
return author_email.group(1)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_content(string):
|
def get_content(string):
|
||||||
|
Loading…
Reference in New Issue
Block a user