Commit 97bc898828f8a281f292cef8913e6ec2dc13eef9

Emilio Cobos Álvarez 2018-03-17T17:40:24

mailmap: Do not error out when the mailmap contains an invalid line This matches git.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/src/mailmap.c b/src/mailmap.c
index 12b684f..54ef720 100644
--- a/src/mailmap.c
+++ b/src/mailmap.c
@@ -180,10 +180,10 @@ int git_mailmap_parse(
 			&file, &found,
 			&real_name, &real_email,
 			&replace_name, &replace_email);
-		if (error < 0)
-			goto cleanup;
-		if (!found)
-			break;
+		if (error < 0 || !found) {
+			error = 0;
+			continue;
+		}
 
 		/* Compute how much space we'll need to store our entry */
 		size = sizeof(git_mailmap_entry);