Skip to content

gitChanges/gitDiff don't handle moves #901

@sandersn

Description

@sandersn

gitDiff doesn't parse the move format correctly (Rnnn fromPath toPath) and gitChanges treats unknown specifiers as adds. Together the two incorrectly treat moves as adds to the old location, which is precisely backward.

Discovered in DefinitelyTyped/DefinitelyTyped#68154; whole-package moves are the least common operation on DT, which is probably why we didn't think to test them, and why it took a month for someday to hit this bug.

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