GitoxideLabs/gitoxide · error
lines in ' ' could not be parsed
Error message
{} lines in '{}' could not be parsed What it means
Reported at the end of `mailmap::verify`, which parses a mailmap file and counts entries that `gix::mailmap::parse` failed to parse. After streaming all entries, if `err_count > 0` the function returns this error naming how many lines were unparseable and which mailmap file they came from. It fires when the mailmap file contains lines that don't match git's mailmap syntax (e.g. malformed `Proper Name <email>` forms, missing brackets, stray tokens). The function also prints OK-line counts and overwrite notes to `out` while collecting errors, so this error signals a partially invalid user-supplied mailmap that needs manual correction.
Solutions
- Inspect each malformed line reported and fix its syntax per git mailmap format (`Name <proper@email> <commit@email>`)
- Check for leftover merge-conflict markers in the file
- Re-run `gix mailmap verify` until it reports all lines OK
Example fix
// before (.mailmap) John Doe john@example.com johnny // after (.mailmap) John Doe <john@example.com> <johnny@example.com>
Defensive patterns
Strategy: validation
Try / catch
if let Err(e) = mailmap::verify(&path, format, &mut out) {
eprintln!("mailmap check failed: {e}");
} Prevention
- Validate .mailmap syntax after every edit
- Run verify as part of CI on repositories with mailmaps
When it happens
Trigger: Running mailmap verification against a `.mailmap` file containing syntactically invalid entries - e.g. malformed `Proper Name <email> <commit-email>` lines - causing `gix::mailmap::parse` to emit errors.
Common situations: Hand-edited mailmap files with typos (missing angle brackets, stray characters); merge conflicts in .mailmap left partially resolved; copied mailmap snippets with wrong formatting.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- BUG: ResolvedSignatures don't exist here when nothing is set
- Only 'human' format is currently supported
- Invalid pathspec - path must not be empty, not be excluded…
- Cannot derive archive format from a file without extension
- Format for extension
AI-assisted analysis of GitoxideLabs/gitoxide@e73179060b (2026-09-08).
Data as JSON: /api/errors/54f9723359c9a11c.
Report an issue: GitHub.
Appendix: source
Thrown at gitoxide-core/src/mailmap.rs:39
let mut seen = HashSet::<(_, _)>::default();
for entry in gix::mailmap::parse(&buf).filter_map(Result::ok) {
if !seen.insert((entry.old_email(), entry.old_name())) {
writeln!(
out,
"NOTE: entry ({:?}, {:?}) -> ({:?}, {:?}) is being overwritten",
entry.old_email(),
entry.old_name(),
entry.new_email(),
entry.new_name()
)?;
}
}
if err_count == 0 {
writeln!(out, "{} lines OK", gix::mailmap::parse(&buf).count())?;
Ok(())
} else {
bail!("{} lines in '{}' could not be parsed", err_count, path.display());
}
}
View on GitHub (pinned to e73179060b)