{"record":{"id":"e4787e4d67be5b15","repo":"vectordotdev/vector","slug":"malformed-git-log-entry-line","errorCode":null,"errorMessage":"Malformed git log entry `{line}`","messagePattern":"Malformed git log entry `(.+?)`","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"vdev/src/commands/release/generate_cue.rs","lineNumber":490,"sourceCode":"    parse_pull_request_history(&commit_history, latest_addition, pull_request_metadata)\n        .with_context(|| {\n            format!(\"Could not determine every PR that added or edited {relative_path}\")\n        })\n}\n\nfn parse_pull_request_history(\n    commit_history: &str,\n    latest_addition: &str,\n    pull_request_metadata: PullRequestMetadata,\n) -> Result<Vec<u64>> {\n    let mut numbers = Vec::new();\n    for line in commit_history\n        .lines()\n        .filter(|line| !line.trim().is_empty())\n    {\n        let (commit, title) = line\n            .split_once('\\t')\n            .ok_or_else(|| anyhow!(\"Malformed git log entry `{line}`\"))?;\n\n        match parse_pull_request_number(title) {\n            Ok(number) if !numbers.contains(&number) => numbers.push(number),\n            Ok(_) => {}\n            Err(_) if pull_request_metadata == PullRequestMetadata::Optional => {}\n            Err(error) => return Err(error.context(format!(\"Commit {commit}: `{title}`\"))),\n        }\n\n        if commit == latest_addition {\n            return Ok(numbers);\n        }\n    }\n\n    match pull_request_metadata {\n        PullRequestMetadata::Optional => Ok(Vec::new()),\n        PullRequestMetadata::Required => {\n            bail!(\"Could not find latest addition commit {latest_addition} in the fragment history\")\n        }","sourceCodeStart":472,"sourceCodeEnd":508,"githubUrl":"https://github.com/vectordotdev/vector/blob/0d4ab78a4f0d9c9e5d03a50108a2ae4d2f4b2460/vdev/src/commands/release/generate_cue.rs#L472-L508","documentation":"parse_pull_request_history splits each non-empty git log line into (commit, title) on a single TAB character. Any line lacking a TAB — i.e. output that doesn't match the expected `git log --format='%H\t%s'` layout — triggers this error, indicating corrupted or hand-modified git log output.","triggerScenarios":"lookup_pull_requests_from_git runs git log over commits touching a fragment; a returned line has no '\\t' separator, e.g. because a custom git log format, git alias, or pager rewrote the output.","commonSituations":"A user has a global git config (e.g. format.pretty override via alias or pager filter) altering log output; running the tool in an environment where GIT_* env vars change log formatting; truncated log output piped through another tool.","solutions":["Run the release command in a clean environment without git config overrides affecting log format (unset GIT_ALIASES / format overrides, disable pagers: `git config --global core.pager cat`).","Verify `git log --format='%H%x09%s'` output for the fragment's commits contains one TAB per line.","Re-run the release command; if a specific commit's subject embeds a TAB, amend the commit message to remove it."],"exampleFix":"// before\n[alias]\n  log = log --graph --oneline   # rewrites all log output\n// after\n# remove the alias or run vdev with overridden config\ngit -c alias.log=log release prepare ...","handlingStrategy":"type-guard","validationCode":"let out = std::process::Command::new(\"git\")\n    .args([\"log\", \"--format=%H%x09%s\"])\n    .output().unwrap();\nassert!(out.stdout.lines().all(|l| l.contains('\\t')), \"unexpected git log format\");","typeGuard":"fn is_wellformed_log_line(line: &str) -> bool { line.split_once('\\t').is_some() }","tryCatchPattern":null,"preventionTips":["Avoid git aliases/config that override log output format for tooling runs","Disable pagers when scripting git (`git --no-pager` / core.pager=cat)","Never embed TAB characters in commit subjects"],"tags":["rust","git","parsing"],"backgroundTag":"unexpected-response-shape","analyzedSha":"0d4ab78a4f0d9c9e5d03a50108a2ae4d2f4b2460","analyzedAt":"2026-09-16T02:53:35.741Z","contentChangedAt":"2026-09-16T02:53:35.741Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}