Skip to content

Line history of newly added lines incorrectly compares against missing #5030

@eamodio

Description

@eamodio

Summary

When navigating to the line history of a newly added line (e.g., via "Open Line Changes with Previous Revision"), the diff sometimes shows the left side as "missing" — as if the file didn't exist before the commit — even though only the line is new and the file existed in prior commits.

Impact

Users viewing line-level diffs for newly added lines see an unhelpful comparison against an empty/missing file instead of seeing the file's state at the parent commit (without the new line).

Validation

  1. Open a file and select a line that was added in a recent commit
  2. Run "Open Line Changes with Previous Revision"
  3. Verify the left side shows the file at the parent commit, not "missing"
  4. Verify that lines in files where the entire file was added in a commit still correctly show "missing"

Risk

Low — only affects the fallback when git log -L returns a single commit for line-range history

Metadata

Metadata

Assignees

Labels

pending-releaseResolved but not yet released to the stable editionverified ✔Verified

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions