microsoft / microsoft/DefinitelyTyped-tools

gitChanges/gitDiff don't handle moves

Open
#901 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
423
Forks
237
Avg merge
18h 18m
Merged PRs (30d)
11

Description

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 https://github.com/DefinitelyTyped/DefinitelyTyped/pull/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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the gitDiff and gitChanges implementations and any existing tests covering Git change specifiers. Reproduce a rename using the R fromPath toPath format, then verify that the move is represented at the destination rather than as an add at the old location.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.