Skip to content

Commit 97bc898

Browse files
emiliomystor
authored andcommitted
mailmap: Do not error out when the mailmap contains an invalid line
This matches git.
1 parent 44112db commit 97bc898

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/mailmap.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,10 @@ int git_mailmap_parse(
180180
&file, &found,
181181
&real_name, &real_email,
182182
&replace_name, &replace_email);
183-
if (error < 0)
184-
goto cleanup;
185-
if (!found)
186-
break;
183+
if (error < 0 || !found) {
184+
error = 0;
185+
continue;
186+
}
187187

188188
/* Compute how much space we'll need to store our entry */
189189
size = sizeof(git_mailmap_entry);

0 commit comments

Comments
 (0)