Skip to content

Report how the working tree changed, not just which files were overwritten #10

Description

@achedon12

After a graft, the report lists the paths the template won a conflict on. That answers which files, but not how much — and a one-line change reads very differently from a rewritten file.

Proposal

Add a line count to each reported path, from git diff --numstat <startSha> HEAD -- <path>:

! The template won 2 conflicted files:
  config/nginx.conf     +12 -3
  src/theme.css         +140 -138

The second line there is the one that should make someone stop and look.

Where to look

applyCommand in src/commands/apply.ts already has result.startSha. The Git class in src/core/git.ts is where a numstat helper belongs.

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

    enhancementA new capability or an improvementhelp wantedExtra attention or a second opinion is welcome

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions