mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-07 00:57:22 +02:00
Added support for number of lines changed for git logs (#557)
Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com> Co-authored-by: kshatalov <kshatalov@citco.com>
This commit is contained in:
committed by
GitHub
parent
6af82fb9ae
commit
0faacb6d0d
@ -320,7 +320,20 @@ def parse(
|
|||||||
if line.startswith(' ') and 'changed, ' not in line:
|
if line.startswith(' ') and 'changed, ' not in line:
|
||||||
# this is a file name
|
# this is a file name
|
||||||
file_name = line.split('|')[0].strip()
|
file_name = line.split('|')[0].strip()
|
||||||
file_list.append(file_name)
|
file_stats = line.split('|')[1].strip()
|
||||||
|
lines_changed_str = file_stats.split(' ')
|
||||||
|
lines_changed_count_str = lines_changed_str[0].strip()
|
||||||
|
lines_changed = 0
|
||||||
|
try:
|
||||||
|
lines_changed = int(lines_changed_count_str)
|
||||||
|
except:
|
||||||
|
#nothing to do
|
||||||
|
pass
|
||||||
|
|
||||||
|
file = {}
|
||||||
|
file["name"] = file_name
|
||||||
|
file["lines_changed"] = lines_changed
|
||||||
|
file_list.append(file)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if line.startswith(' ') and 'changed, ' in line:
|
if line.startswith(' ') and 'changed, ' in line:
|
||||||
|
Reference in New Issue
Block a user