Skip to content

file-history: count a trailing-newline-only change instead of reporting 0/0 #3449

Description

@liukx0205

countLineDiff's splitLines drops the trailing empty element, so a and a\n compare equal and a trailing-newline-only edit reports 0 additions / 0 deletions from the authoritative endpoint. The client side fixed this with a last-line sentinel in its diff splitter (kimi-code-app#434); the daemon's countLineDiff should adopt the same semantics so authoritative counts agree.

Follow-up from the #3339 review round.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions