mirror of
https://github.com/ejwa/gitinspector.git
synced 2025-03-18 14:28:00 +01: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
1 changed files with 2 additions and 2 deletions
|
@ -143,8 +143,8 @@ class Blame:
|
|||
|
||||
@staticmethod
|
||||
def get_author_email(string):
|
||||
author_email = re.search(" \((.*?)\d\d\d\d-\d\d-\d\d", string)
|
||||
return author_email.group(1).strip().lstrip("<").rstrip(">")
|
||||
author_email = re.search("^[0-9a-f]{8} \(<([^>]*)", string)
|
||||
return author_email.group(1)
|
||||
|
||||
@staticmethod
|
||||
def get_content(string):
|
||||
|
|
Loading…
Add table
Reference in a new issue