From 79e37a7383edb58b497bd3df4438e8f1746078f7 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Fri, 22 Apr 2022 12:12:38 -0700 Subject: [PATCH] fix for oneline output --- jc/parsers/git_log.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/jc/parsers/git_log.py b/jc/parsers/git_log.py index 4e0ab7a4..81bf3d9f 100644 --- a/jc/parsers/git_log.py +++ b/jc/parsers/git_log.py @@ -234,11 +234,18 @@ def parse( # oneline style if line_list and _is_commit_hash(line_list[0]): + if output_line: + if file_list: + output_line['stats']['files'] = file_list + + raw_output.append(output_line) + output_line = {} + message_lines = [] + file_list = [] output_line = { 'commit': line_list[0], 'message': line_list[1] } - raw_output.append(output_line) continue # all other styles