about summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ui-log.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui-log.c b/ui-log.c
index 4573255..a4dc707 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -141,7 +141,9 @@ static int show_commit(struct commit *commit, struct rev_info *revs)
 
 	/* When we get here we have precisely one parent. */
 	parent = parents->item;
-	parse_commit(parent);
+	/* If we can't parse the commit, let print_commit() report an error. */
+	if (parse_commit(parent))
+		return 1;
 
 	files = 0;
 	add_lines = 0;