Skip to content

Scoped document refresh loses old rename paths and quoted Git filenames #427

Open

Description

@DivyamTalwar

Problem

Line-based parsing of git --name-only output trims or misreads literal filenames, and rename detection reports only the destination. Scoped refresh therefore misses old-path orphaned documents and files containing newlines or quoted/non-ASCII characters.

Reproduction and expected behavior

In a temporary Git repository, rename a documented file and add files containing spaces, a newline or non-ASCII characters. changedFilesFromGit must return exact paths and both rename endpoints. The tests use real git commands and preserve no user repository state.

Reproduced against ce30de7ca94115cb73fa991538c6d2595ac2622a using repository-native tests and isolated fixtures. A focused correction is implemented and independently validated; I will link its PR here.

Proposed scope

Read NUL-delimited Git output without trimming. Disable rename presentation for the candidate inventory so both deleted and added paths are retained. Apply the same delimiter contract to untracked paths and the previous-commit window.

The existing HEAD/HEAD~1 window, full-scan fallback and candidate expansion remain unchanged. GitRunner test doubles must return the NUL-delimited output requested by the new arguments. No broader historical scan is introduced.

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